Documentation ¶
Index ¶
- func TestABICompliance(t *testing.T, cc *seth.CompiledContract)
- func TestCompliance(t *Token)
- type Token
- func (t *Token) Approve(sender, to *seth.Address, amt *seth.Int) (bool, error)
- func (t *Token) BalanceOf(addr *seth.Address) *seth.Int
- func (t *Token) TotalSupply() *seth.Int
- func (t *Token) Transfer(sender, to *seth.Address, amt *seth.Int) (bool, error)
- func (t *Token) TransferFrom(sender, from, to *seth.Address, amt *seth.Int) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestABICompliance ¶
func TestABICompliance(t *testing.T, cc *seth.CompiledContract)
TestABICompliance tests that the ABI for the contract matches the public interface of an ERC20 token, including constant functions and events.
func TestCompliance ¶
func TestCompliance(t *Token)
TestERC20Compliance is a function that helps verify compliance with the ERC20 standard.
'token' should be the address of the token contract on the chain, and 'owner' should be the owner of the token contract. 'mint' should mint tokens to the given address in the given quantity
Types ¶
type Token ¶
type Token struct { *testing.T C *tevm.Chain Addr *seth.Address // address of the contract in the chain Owner *seth.Address // if there is an owner, this address Mint func(t *Token, addr *seth.Address, amt *seth.Int) error HasBurn bool // token has 'burn(uint256)' defined }
func (*Token) TotalSupply ¶
Click to show internal directories.
Click to hide internal directories.