Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployERC20Token ¶
func DeployERC20Token( version ERC20TokenVersion, auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string, decimals uint8, totalSupply *big.Int, ) (address common.Address, tx *ethTypes.Transaction, err error)
Types ¶
type ERC20Token ¶
type ERC20Token struct { ERC20TokenStandard ERC20TokenCommon ERC20TokenTesting Address common.Address Version ERC20TokenVersion // contains filtered or unexported fields }
func NewERC20Token ¶
func NewERC20Token( ethClient *ethclient.Client, hexAddress string, version ERC20TokenVersion, ) (*ERC20Token, error)
func (*ERC20Token) GetInfo ¶
func (t *ERC20Token) GetInfo() (result ERC20TokenInfo, err error)
func (*ERC20Token) Mint ¶
func (t *ERC20Token) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error)
type ERC20TokenCommon ¶
type ERC20TokenInfo ¶
type ERC20TokenStandard ¶
type ERC20TokenStandard interface { BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) TotalSupply(opts *bind.CallOpts) (*big.Int, error) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) }
type ERC20TokenTesting ¶
type ERC20TokenTesting interface { Faucet(opts *bind.TransactOpts) (*types.Transaction, error) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) SetBurnEnabled(opts *bind.TransactOpts, burnEnabled_ bool) (*types.Transaction, error) BurnEnabled(opts *bind.CallOpts) (bool, error) SetFaucetAmount(opts *bind.TransactOpts, faucetAmount_ *big.Int) (*types.Transaction, error) SetFaucetCallLimit(opts *bind.TransactOpts, faucetCallLimit_ *big.Int) (*types.Transaction, error) FaucetCallLimit(opts *bind.CallOpts) (*big.Int, error) FaucetAmount(opts *bind.CallOpts) (*big.Int, error) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) MINTERROLE(opts *bind.CallOpts) ([32]byte, error) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) }
type ERC20TokenVersion ¶
type ERC20TokenVersion string
const ( ERC20TokenBase ERC20TokenVersion = "TokenBase" ERC20TokenOld ERC20TokenVersion = "TokenOld" // deprecated - don't ever use, remove if you can ERC20TokenOther ERC20TokenVersion = "TokenOther" ERC20TokenMinimal ERC20TokenVersion = "TokenMinimal" )
func (ERC20TokenVersion) IsValid ¶
func (n ERC20TokenVersion) IsValid() error
Click to show internal directories.
Click to hide internal directories.