Documentation ¶
Index ¶
- Variables
- type SourcesAndDests
- type Tx
- func (tx *Tx) AddSignatures(signatures ...xc.TxSignature) error
- func (tx Tx) Amount() xc.AmountBlockchain
- func (tx Tx) ContractAddress() xc.ContractAddress
- func (tx Tx) Fee(baseFeeUint uint64, gasUsedUint uint64) xc.AmountBlockchain
- func (tx Tx) From() xc.Address
- func (tx Tx) GetSignatures() []xc.TxSignature
- func (tx Tx) Hash() xc.TxHash
- func (tx Tx) IsContract() bool
- func (tx Tx) ParseERC20TransferTx(nativeAsset xc.NativeAsset) (SourcesAndDests, error)
- func (tx *Tx) ParseTokenLogs(receipt *types.Receipt, nativeAsset xc.NativeAsset) SourcesAndDests
- func (tx Tx) Serialize() ([]byte, error)
- func (tx Tx) Sighashes() ([]xc.TxDataToSign, error)
- func (tx Tx) To() xc.Address
Constants ¶
This section is empty.
Variables ¶
View Source
var ERC20 abi.ABI
Functions ¶
This section is empty.
Types ¶
type SourcesAndDests ¶
type SourcesAndDests struct { Sources []*xc.LegacyTxInfoEndpoint Destinations []*xc.LegacyTxInfoEndpoint }
type Tx ¶
type Tx struct { EthTx *types.Transaction Signer types.Signer Signatures []xc.TxSignature }
Tx for EVM
func (*Tx) AddSignatures ¶
func (tx *Tx) AddSignatures(signatures ...xc.TxSignature) error
AddSignatures adds a signature to Tx
func (Tx) ContractAddress ¶
func (tx Tx) ContractAddress() xc.ContractAddress
ContractAddress returns the contract address for a token transfer
func (Tx) Fee ¶
func (tx Tx) Fee(baseFeeUint uint64, gasUsedUint uint64) xc.AmountBlockchain
Fee returns the fee associated to the tx
func (Tx) GetSignatures ¶
func (tx Tx) GetSignatures() []xc.TxSignature
func (Tx) IsContract ¶
IsContract returns whether a tx is a contract or native transfer
func (Tx) ParseERC20TransferTx ¶
func (tx Tx) ParseERC20TransferTx(nativeAsset xc.NativeAsset) (SourcesAndDests, error)
ParseERC20TransferTx parses the tx payload as ERC20 transfer
func (*Tx) ParseTokenLogs ¶
func (tx *Tx) ParseTokenLogs(receipt *types.Receipt, nativeAsset xc.NativeAsset) SourcesAndDests
ParseTransfer parses a tx and extracts higher-level transfer information
Click to show internal directories.
Click to hide internal directories.