Documentation ¶
Index ¶
Constants ¶
View Source
const ( AmountCallData = "amount" ToCallData = "to" ERC20ContractABI = `` /* 4265-byte string literal not displayed */ )
View Source
const ( TransferFunction = "transfer" BalanceOfFunction = "balanceOf" AmountField = "amount" ToField = "to" )
Variables ¶
This section is empty.
Functions ¶
func CreateBalanceOfData ¶
func CreateBalanceOfData(address gethcommon.Address) []byte
func CreateTransferTxData ¶
func CreateTransferTxData(address gethcommon.Address, amount *big.Int) []byte
func DecodeTransferTx ¶
func DecodeTransferTx(t *types.Transaction, logger gethlog.Logger) (bool, *gethcommon.Address, *big.Int)
Types ¶
type ERC20ContractLib ¶
type ERC20ContractLib interface { // DecodeTx receives a *types.Transaction and converts it to an common.L1Transaction // returns nil if the transaction is not convertible DecodeTx(tx *types.Transaction) ethadapter.L1Transaction // CreateDepositTx receives an common.L1Transaction and converts it to an eth transaction CreateDepositTx(tx *ethadapter.L1DepositTx) types.TxData }
ERC20ContractLib provides methods for handling erc20 contracts
func NewERC20ContractLib ¶
func NewERC20ContractLib(mgmtContractAddr *gethcommon.Address, contractAddrs ...*gethcommon.Address) ERC20ContractLib
Click to show internal directories.
Click to hide internal directories.