erc20contractlib

package
v0.24.6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

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