Documentation
¶
Index ¶
- Variables
- func BuildERC20Payload(to xc.Address, amount xc.AmountBlockchain) ([]byte, error)
- func BuildSmartAccountPayload(packedCalls []byte, signature xc.TxSignature) ([]byte, error)
- func EvmDestinationAndAmountAndData(to xc.Address, amount xc.AmountBlockchain, contractMaybe contractGetter) (common.Address, *big.Int, []byte, error)
- func Fee(gasTipCap xc.AmountBlockchain, gasPrice xc.AmountBlockchain, ...) xc.AmountBlockchain
- func GetChainId(chain *xc.ChainBaseConfig, input *tx_input.TxInput) uint256.Int
- func GetEthSigner(chain *xc.ChainBaseConfig, input *tx_input.TxInput) types.Signer
- func NewCustomTx(input *tx_input.TxInput, chain *xc.ChainBaseConfig, ethTx *types.Transaction) xc.Tx
- type CustomTx
- func (tx *CustomTx) AddSignatures(signatures []*xc.SignatureResponse)
- func (tx *CustomTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
- func (tx *CustomTx) BuildEthTx() (*types.Transaction, error)
- func (tx *CustomTx) Serialize() ([]byte, error)
- func (tx *CustomTx) Sighashes() ([]*xc.SignatureRequest, error)
- type FeePayerTx
- func (tx *FeePayerTx) AddSignatures(signatures []*xc.SignatureResponse)
- func (tx *FeePayerTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
- func (tx *FeePayerTx) BuildEthTx() (*types.Transaction, error)
- func (tx *FeePayerTx) BuildPackedCalls() ([]byte, error)
- func (tx *FeePayerTx) Serialize() ([]byte, error)
- func (tx *FeePayerTx) Sighashes() ([]*xc.SignatureRequest, error)
- type LegacyTx
- func (tx *LegacyTx) AddSignatures(signatures []*xc.SignatureResponse)
- func (tx *LegacyTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
- func (tx *LegacyTx) BuildEthTx() (*types.Transaction, error)
- func (tx *LegacyTx) Serialize() ([]byte, error)
- func (tx *LegacyTx) Sighashes() ([]*xc.SignatureRequest, error)
- type SingleTx
- func (tx *SingleTx) AddSignatures(signatures []*xc.SignatureResponse)
- func (tx *SingleTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
- func (tx *SingleTx) BuildEthTx() (*types.Transaction, error)
- func (tx *SingleTx) Serialize() ([]byte, error)
- func (tx *SingleTx) Sighashes() ([]*xc.SignatureRequest, error)
- type SmartAccountCall
- type SourcesAndDests
- type Tx
- func (tx Tx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
- func (tx Tx) GetMockEthTx() *types.Transaction
- func (tx Tx) Hash() xc.TxHash
- func (tx Tx) Serialize() ([]byte, error)
- func (tx *Tx) SetSignatures(signatures ...*xc.SignatureResponse) error
- func (tx Tx) Sighashes() ([]*xc.SignatureRequest, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ERC20 abi.ABI
Functions ¶
func BuildERC20Payload ¶
func BuildSmartAccountPayload ¶
func BuildSmartAccountPayload(packedCalls []byte, signature xc.TxSignature) ([]byte, error)
func EvmDestinationAndAmountAndData ¶
func EvmDestinationAndAmountAndData(to xc.Address, amount xc.AmountBlockchain, contractMaybe contractGetter) (common.Address, *big.Int, []byte, error)
On EVM the destination address is the recipient of an ether transfer, but for token transfers, it is the token contract address (the token recipient is then in the data). The .amount field similarly must be in native transaction or in the data for a token transfer.
func Fee ¶
func Fee(gasTipCap xc.AmountBlockchain, gasPrice xc.AmountBlockchain, baseFeeUint uint64, gasUsedUint uint64) xc.AmountBlockchain
Fee returns the fee associated to the tx
func GetChainId ¶
func GetEthSigner ¶
func NewCustomTx ¶
func NewCustomTx(input *tx_input.TxInput, chain *xc.ChainBaseConfig, ethTx *types.Transaction) xc.Tx
Types ¶
type CustomTx ¶
type CustomTx struct {
// contains filtered or unexported fields
}
func (*CustomTx) AddSignatures ¶
func (tx *CustomTx) AddSignatures(signatures []*xc.SignatureResponse)
func (*CustomTx) AdditionalSighashes ¶
func (tx *CustomTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
func (*CustomTx) BuildEthTx ¶
func (tx *CustomTx) BuildEthTx() (*types.Transaction, error)
type FeePayerTx ¶
type FeePayerTx struct {
// contains filtered or unexported fields
}
func NewFeePayerTx ¶
func NewFeePayerTx(args xcbuilder.MultiTransferArgs, input *tx_input.TxInput, chain *xc.ChainBaseConfig) *FeePayerTx
func (*FeePayerTx) AddSignatures ¶
func (tx *FeePayerTx) AddSignatures(signatures []*xc.SignatureResponse)
func (*FeePayerTx) AdditionalSighashes ¶
func (tx *FeePayerTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
func (*FeePayerTx) BuildEthTx ¶
func (tx *FeePayerTx) BuildEthTx() (*types.Transaction, error)
func (*FeePayerTx) BuildPackedCalls ¶
func (tx *FeePayerTx) BuildPackedCalls() ([]byte, error)
func (*FeePayerTx) Serialize ¶
func (tx *FeePayerTx) Serialize() ([]byte, error)
func (*FeePayerTx) Sighashes ¶
func (tx *FeePayerTx) Sighashes() ([]*xc.SignatureRequest, error)
type LegacyTx ¶
type LegacyTx struct {
// contains filtered or unexported fields
}
func NewLegacyTx ¶
func NewLegacyTx(args xcbuilder.TransferArgs, input *tx_input.TxInput, chain *xc.ChainBaseConfig) *LegacyTx
func (*LegacyTx) AddSignatures ¶
func (tx *LegacyTx) AddSignatures(signatures []*xc.SignatureResponse)
func (*LegacyTx) AdditionalSighashes ¶
func (tx *LegacyTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
func (*LegacyTx) BuildEthTx ¶
func (tx *LegacyTx) BuildEthTx() (*types.Transaction, error)
type SingleTx ¶
type SingleTx struct {
// contains filtered or unexported fields
}
func NewSingleTx ¶
func NewSingleTx(args xcbuilder.TransferArgs, input *tx_input.TxInput, chain *xc.ChainBaseConfig) *SingleTx
func (*SingleTx) AddSignatures ¶
func (tx *SingleTx) AddSignatures(signatures []*xc.SignatureResponse)
func (*SingleTx) AdditionalSighashes ¶
func (tx *SingleTx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
func (*SingleTx) BuildEthTx ¶
func (tx *SingleTx) BuildEthTx() (*types.Transaction, error)
type SmartAccountCall ¶
type SourcesAndDests ¶
type SourcesAndDests struct {
Sources []*txinfo.LegacyTxInfoEndpoint
Destinations []*txinfo.LegacyTxInfoEndpoint
}
func ParseTokenLogs ¶
func ParseTokenLogs(receipt *types.Receipt, nativeAsset xc.NativeAsset) SourcesAndDests
ParseTransfer parses a tx and extracts higher-level transfer information
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
Tx for EVM
func NewMultiTx ¶
func NewMultiTx(chain *xc.ChainBaseConfig, args xcbuilder.MultiTransferArgs, input *tx_input.TxInput) (*Tx, error)
func NewTx ¶
func NewTx(chain *xc.ChainBaseConfig, args xcbuilder.TransferArgs, input *tx_input.TxInput, legacy bool) (*Tx, error)
func (Tx) AdditionalSighashes ¶
func (tx Tx) AdditionalSighashes() ([]*xc.SignatureRequest, error)
func (Tx) GetMockEthTx ¶
func (tx Tx) GetMockEthTx() *types.Transaction
func (*Tx) SetSignatures ¶
func (tx *Tx) SetSignatures(signatures ...*xc.SignatureResponse) error
SetSignatures adds a signature to Tx
Source Files
¶
Click to show internal directories.
Click to hide internal directories.