Documentation ¶
Index ¶
- Constants
- func BuildTx(opType string, matches []*parser.Match, metadata Metadata, codec codec.Manager, ...) (*evm.Tx, []*types.AccountIdentifier, error)
- func IsAtomicOpType(t string) bool
- func IsCChainBech32Address(accountIdentifier *types.AccountIdentifier) bool
- type Metadata
- type Options
- type TxParser
Constants ¶
View Source
const ( MetadataAtomicTxGas = "atomic_tx_gas" MetadataNonce = "nonce" MetadataSourceChain = "source_chain" )
Variables ¶
This section is empty.
Functions ¶
func BuildTx ¶
func BuildTx(opType string, matches []*parser.Match, metadata Metadata, codec codec.Manager, avaxAssetID ids.ID) (*evm.Tx, []*types.AccountIdentifier, error)
BuildTx constructs an evm tx based on the provided operation type, Rosetta matches and metadata This method is only used during construction.
func IsAtomicOpType ¶
IsAtomicOpType determines whether a given C-chain operation is an atomic one
func IsCChainBech32Address ¶
func IsCChainBech32Address(accountIdentifier *types.AccountIdentifier) bool
IsCChainBech32Address checks whether a given account identifier contains a C-chain Bech32 type address
Types ¶
type Metadata ¶
type Metadata struct { NetworkID uint32 `json:"network_id,omitempty"` CChainID ids.ID `json:"c_chain_id,omitempty"` SourceChainID *ids.ID `json:"source_chain_id,omitempty"` DestinationChain string `json:"destination_chain,omitempty"` DestinationChainID *ids.ID `json:"destination_chain_id,omitempty"` Nonce uint64 `json:"nonce"` }
Metadata contains metadata values returned by /construction/metadata for C-chain atomic transactions
type Options ¶
type Options struct { AtomicTxGas *big.Int `json:"atomic_tx_gas"` From string `json:"from,omitempty"` SourceChain string `json:"source_chain,omitempty"` DestinationChain string `json:"destination_chain,omitempty"` Nonce *big.Int `json:"nonce,omitempty"` }
Options contains response values returned by /construction/preprocess for C-chain atomic transactions
type TxParser ¶
type TxParser struct {
// contains filtered or unexported fields
}
TxParser parses C-chain atomic transactions and generate corresponding Rosetta operations
func NewTxParser ¶
func NewTxParser(hrp string, chainIDs map[ids.ID]string, inputTxAccounts map[string]*types.AccountIdentifier) *TxParser
NewTxParser returns a new transaction parser
Click to show internal directories.
Click to hide internal directories.