Documentation ¶
Index ¶
- Constants
- Variables
- func Account(address *common.Address) *types.AccountIdentifier
- func Amount(value *big.Int, currency *types.Currency) *types.Amount
- func AtomicAvaxAmount(value *big.Int) *types.Amount
- func AvaxAmount(value *big.Int) *types.Amount
- func BlockMetadata(block *types.Block) map[string]interface{}
- func CallType(t string) bool
- func CreateType(t string) bool
- func CrossChainTransactions(networkIdentifier *types.NetworkIdentifier, ...) ([]*types.Transaction, error)
- func DecodeToBytes(binaryData string) ([]byte, error)
- func DecodeUTXOID(s string) (*avax.UTXOID, error)
- func EncodeBytes(bytes []byte) (string, error)
- func EqualFoldContains(arr []string, str string) bool
- func Erc20Amount(bytes []byte, currency *types.Currency, sender bool) *types.Amount
- func GetHRP(networkIdentifier *types.NetworkIdentifier) (string, error)
- func MarshalJSONMap(i interface{}) (map[string]interface{}, error)
- func MempoolTransactionsIDs(accountMap client.TxAccountMap) []*types.TransactionIdentifier
- func Peers(peers []info.Peer) []*types.Peer
- func ToCurrency(symbol string, decimals uint8, contractAddress common.Address) *types.Currency
- func Transaction(header *ethtypes.Header, tx *ethtypes.Transaction, msg *core.Message, ...) (*types.Transaction, error)
- func UnmarshalJSONMap(m map[string]interface{}, i interface{}) error
Constants ¶
View Source
const ( ContractAddressMetadata = "contractAddress" IndexTransferredMetadata = "indexTransferred" OpCall = "CALL" OpFee = "FEE" OpCreate = "CREATE" OpCreate2 = "CREATE2" OpSelfDestruct = "SELFDESTRUCT" OpCallCode = "CALLCODE" OpDelegateCall = "DELEGATECALL" OpStaticCall = "STATICCALL" OpDestruct = "DESTRUCT" OpImport = "IMPORT" OpExport = "EXPORT" OpErc20Transfer = "ERC20_TRANSFER" OpErc20Mint = "ERC20_MINT" OpErc20Burn = "ERC20_BURN" OpErc721TransferSender = "ERC721_SENDER" OpErc721TransferReceive = "ERC721_RECEIVE" OpErc721Mint = "ERC721_MINT" OpErc721Burn = "ERC721_BURN" StatusSuccess = "SUCCESS" StatusFailure = "FAILURE" MetadataTxFee = "tx_fee" MetadataImportedInputs = "imported_inputs" MetadataExportedOutputs = "exported_outputs" MetadataAddressFormat = "address_format" AddressFormatBech32 = "bech32" )
Variables ¶
View Source
var ( StageBootstrap = &types.SyncStatus{ Synced: types.Bool(false), Stage: types.String("BOOTSTRAP"), } StageSynced = &types.SyncStatus{ Synced: types.Bool(true), Stage: types.String("SYNCED"), } AvaxCurrency = &types.Currency{ Symbol: "AVAX", Decimals: 18, } AtomicAvaxCurrency = &types.Currency{ Symbol: "AVAX", Decimals: 9, } OperationStatuses = []*types.OperationStatus{ { Status: StatusSuccess, Successful: true, }, { Status: StatusFailure, Successful: false, }, } OperationTypes = []string{ OpFee, OpCall, OpCreate, OpCreate2, OpSelfDestruct, OpCallCode, OpDelegateCall, OpStaticCall, OpDestruct, OpImport, OpExport, OpErc20Burn, OpErc20Mint, OpErc20Transfer, OpErc721TransferReceive, OpErc721TransferSender, OpErc721Mint, OpErc721Burn, } CallMethods = []string{ "eth_getTransactionReceipt", } )
View Source
var (
X2crate = big.NewInt(1000000000)
)
Functions ¶
func AtomicAvaxAmount ¶ added in v0.1.26
AtomicAvaxAmount creates a Rosetta Amount representing AVAX amount in nAVAXs with given quantity
func BlockMetadata ¶
BlockMetadata returns meta data for a block
func CreateType ¶
func CrossChainTransactions ¶
func CrossChainTransactions( networkIdentifier *types.NetworkIdentifier, chainIDToAliasMapping map[ids.ID]constants.ChainIDAlias, avaxAssetID string, block *ethtypes.Block, ap5Activation uint64, ) ([]*types.Transaction, error)
func DecodeToBytes ¶ added in v0.1.26
DecodeToBytes decodes given string into bytes using the same encoding as EncodeBytes
func DecodeUTXOID ¶ added in v0.1.26
DecodeUTXOID decodes given string into avax.UTXOID
func EncodeBytes ¶ added in v0.1.26
EncodeBytes encodes given bytes to string
func EqualFoldContains ¶ added in v0.0.26
EqualFoldContains checks if the array contains the string regardless of casing
func Erc20Amount ¶ added in v0.0.26
func GetHRP ¶ added in v0.1.26
func GetHRP(networkIdentifier *types.NetworkIdentifier) (string, error)
GetHRP fetches hrp for address formatting.
func MarshalJSONMap ¶ added in v0.1.26
MarshalJSONMap converts an interface into a map[string]interface{}.
func MempoolTransactionsIDs ¶
func MempoolTransactionsIDs(accountMap client.TxAccountMap) []*types.TransactionIdentifier
MempoolTransactionsIDs returns a list of transction IDs in the mempool
func ToCurrency ¶ added in v0.1.5
func Transaction ¶
func Transaction( header *ethtypes.Header, tx *ethtypes.Transaction, msg *core.Message, receipt *ethtypes.Receipt, trace *client.Call, flattenedTrace []*client.FlatCall, rpcClient client.Client, isAnalyticsMode bool, standardModeWhiteList []string, includeUnknownTokens bool, ) (*types.Transaction, error)
func UnmarshalJSONMap ¶ added in v0.1.26
UnmarshalJSONMap converts map[string]interface{} into a interface{}.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.