mapper

package
v0.0.0-...-778b29f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetChainID = 534
	MainnetAssetID = "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z"

	FujiChainID = 613
	FujiAssetID = "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK"

	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"
)

Variables

View Source
var (
	MainnetAP5Activation = params.AvalancheMainnetChainConfig.ApricotPhase5BlockTimestamp // change
	FujiAP5Activation    = params.AvalancheFujiChainConfig.ApricotPhase5BlockTimestamp

	StageBootstrap = &types.SyncStatus{
		Synced: types.Bool(false),
		Stage:  types.String("BOOTSTRAP"),
	}

	StageSynced = &types.SyncStatus{
		Synced: types.Bool(true),
		Stage:  types.String("SYNCED"),
	}

	CndlCurrency = &types.Currency{
		Symbol:   "CNDL",
		Decimals: 18,
	}

	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",
	}
)

Functions

func Account

func Account(address *ethcommon.Address) *types.AccountIdentifier

func Amount

func Amount(value *big.Int, currency *types.Currency) *types.Amount

func BlockMetadata

func BlockMetadata(block *corethTypes.Block) map[string]interface{}

BlockMetadata returns meta data for a block

func CallType

func CallType(t string) bool

func CndlAmount

func CndlAmount(value *big.Int) *types.Amount

func CreateType

func CreateType(t string) bool

func CrossChainTransactions

func CrossChainTransactions(
	avaxAssetID string,
	block *ethtypes.Block,
	ap5Activation uint64,
) ([]*types.Transaction, error)

func EqualFoldContains

func EqualFoldContains(arr []string, str string) bool

EqualFoldContains checks if the array contains the string regardless of casing

func Erc20Amount

func Erc20Amount(
	bytes []byte,
	currency *types.Currency,
	sender bool,
) *types.Amount

func MempoolTransactionsIDs

func MempoolTransactionsIDs(accountMap clientTypes.TxAccountMap) []*types.TransactionIdentifier

MempoolTransactionsIDs returns a list of transction IDs in the mempool

func Peers

func Peers(peers []info.Peer) []*types.Peer

func ToCurrency

func ToCurrency(symbol string, decimals uint8, contractAddress common.Address) *types.Currency

func Transaction

func Transaction(
	header *ethtypes.Header,
	tx *ethtypes.Transaction,
	msg *ethtypes.Message,
	receipt *ethtypes.Receipt,
	trace *clientTypes.Call,
	flattenedTrace []*clientTypes.FlatCall,
	client clientTypes.Client,
	isAnalyticsMode bool,
	standardModeWhiteList []string,
	includeUnknownTokens bool,
) (*types.Transaction, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL