Documentation ¶
Index ¶
- func MakeAllowanceTokenKey(sender common.Address) []byte
- type TokenContract
- func (cont *TokenContract) Address() common.Address
- func (cont *TokenContract) Allowance(cc types.ContractLoader, _owner common.Address, _spender common.Address) *amount.Amount
- func (cont *TokenContract) Approve(cc *types.ContractContext, spender common.Address, Amount *amount.Amount) error
- func (cont *TokenContract) BalanceOf(cc types.ContractLoader, from common.Address) *amount.Amount
- func (cont *TokenContract) Burn(cc *types.ContractContext, am *amount.Amount) error
- func (cont *TokenContract) ChargeFee(cc *types.ContractContext, fee *amount.Amount) error
- func (cont *TokenContract) CollectedFee(cc types.ContractLoader) *amount.Amount
- func (cont *TokenContract) Decimals(cc types.ContractLoader) *big.Int
- func (cont *TokenContract) DelegateFeeApprove(cc *types.ContractContext, spender common.Address, Amount *amount.Amount) error
- func (cont *TokenContract) DelegateFeeTransfer(cc *types.ContractContext, To common.Address, Amount *amount.Amount) error
- func (cont *TokenContract) Front() interface{}
- func (cont *TokenContract) Init(addr common.Address, master common.Address)
- func (cont *TokenContract) IsGateway(cc types.ContractLoader, addr common.Address) bool
- func (cont *TokenContract) IsManager(cc types.ContractLoader, addr common.Address) bool
- func (cont *TokenContract) IsMinter(cc types.ContractLoader, addr common.Address) bool
- func (cont *TokenContract) Master() common.Address
- func (cont *TokenContract) Mint(cc *types.ContractContext, To common.Address, Amount *amount.Amount) error
- func (cont *TokenContract) MintBatch(cc *types.ContractContext, Tos []common.Address, Amounts []*amount.Amount) error
- func (cont *TokenContract) Name(cc types.ContractLoader) string
- func (cont *TokenContract) OnCreate(cc *types.ContractContext, Args []byte) error
- func (cont *TokenContract) OnReward(cc *types.ContractContext, b *types.Block, CountMap map[common.Address]uint32) (map[common.Address]*amount.Amount, error)
- func (cont *TokenContract) Pause(cc *types.ContractContext) error
- func (cont *TokenContract) SetDelegateFee(cc *types.ContractContext, spender, banker common.Address, ...) error
- func (cont *TokenContract) SetGateway(cc *types.ContractContext, Gateway common.Address, Is bool) error
- func (cont *TokenContract) SetMinter(cc *types.ContractContext, To common.Address, Is bool) error
- func (cont *TokenContract) SetName(cc *types.ContractContext, name string) error
- func (cont *TokenContract) SetRouter(cc *types.ContractContext, router common.Address, path []common.Address) error
- func (cont *TokenContract) SetSymbol(cc *types.ContractContext, symbol string) error
- func (cont *TokenContract) SetTokenManager(cc *types.ContractContext, To common.Address, Is bool) error
- func (cont *TokenContract) SetVersion(cc *types.ContractContext, version uint8) error
- func (cont *TokenContract) SubCollectedFee(cc *types.ContractContext, am *amount.Amount) error
- func (cont *TokenContract) SwapToMainToken(cc *types.ContractContext, amt *amount.Amount) (*amount.Amount, error)
- func (cont *TokenContract) Symbol(cc types.ContractLoader) string
- func (cont *TokenContract) TokenInRevert(cc *types.ContractContext, Platform string, ercHash string, to common.Address, ...) error
- func (cont *TokenContract) TotalSupply(cc types.ContractLoader) *amount.Amount
- func (cont *TokenContract) Transfer(cc *types.ContractContext, To common.Address, Amount *amount.Amount) error
- func (cont *TokenContract) TransferFrom(cc *types.ContractContext, From common.Address, To common.Address, ...) error
- func (cont *TokenContract) Unpause(cc *types.ContractContext) error
- func (cont *TokenContract) Version(cc *types.ContractContext) uint8
- type TokenContractConstruction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAllowanceTokenKey ¶
Types ¶
type TokenContract ¶
type TokenContract struct {
// contains filtered or unexported fields
}
func (*TokenContract) Address ¶
func (cont *TokenContract) Address() common.Address
func (*TokenContract) Allowance ¶
func (cont *TokenContract) Allowance(cc types.ContractLoader, _owner common.Address, _spender common.Address) *amount.Amount
func (*TokenContract) Approve ¶
func (cont *TokenContract) Approve(cc *types.ContractContext, spender common.Address, Amount *amount.Amount) error
func (*TokenContract) BalanceOf ¶
func (cont *TokenContract) BalanceOf(cc types.ContractLoader, from common.Address) *amount.Amount
func (*TokenContract) Burn ¶
func (cont *TokenContract) Burn(cc *types.ContractContext, am *amount.Amount) error
func (*TokenContract) ChargeFee ¶
func (cont *TokenContract) ChargeFee(cc *types.ContractContext, fee *amount.Amount) error
func (*TokenContract) CollectedFee ¶
func (cont *TokenContract) CollectedFee(cc types.ContractLoader) *amount.Amount
func (*TokenContract) Decimals ¶
func (cont *TokenContract) Decimals(cc types.ContractLoader) *big.Int
func (*TokenContract) DelegateFeeApprove ¶
func (cont *TokenContract) DelegateFeeApprove(cc *types.ContractContext, spender common.Address, Amount *amount.Amount) error
func (*TokenContract) DelegateFeeTransfer ¶
func (cont *TokenContract) DelegateFeeTransfer(cc *types.ContractContext, To common.Address, Amount *amount.Amount) error
func (*TokenContract) Front ¶
func (cont *TokenContract) Front() interface{}
func (*TokenContract) Init ¶
func (cont *TokenContract) Init(addr common.Address, master common.Address)
func (*TokenContract) IsGateway ¶
func (cont *TokenContract) IsGateway(cc types.ContractLoader, addr common.Address) bool
func (*TokenContract) IsManager ¶
func (cont *TokenContract) IsManager(cc types.ContractLoader, addr common.Address) bool
func (*TokenContract) IsMinter ¶
func (cont *TokenContract) IsMinter(cc types.ContractLoader, addr common.Address) bool
func (*TokenContract) Master ¶
func (cont *TokenContract) Master() common.Address
func (*TokenContract) Mint ¶
func (cont *TokenContract) Mint(cc *types.ContractContext, To common.Address, Amount *amount.Amount) error
func (*TokenContract) MintBatch ¶
func (cont *TokenContract) MintBatch(cc *types.ContractContext, Tos []common.Address, Amounts []*amount.Amount) error
func (*TokenContract) Name ¶
func (cont *TokenContract) Name(cc types.ContractLoader) string
func (*TokenContract) OnCreate ¶
func (cont *TokenContract) OnCreate(cc *types.ContractContext, Args []byte) error
func (*TokenContract) Pause ¶
func (cont *TokenContract) Pause(cc *types.ContractContext) error
func (*TokenContract) SetDelegateFee ¶
func (cont *TokenContract) SetDelegateFee(cc *types.ContractContext, spender, banker common.Address, approveFee, approveLowerLimit, transferFee *amount.Amount) error
func (*TokenContract) SetGateway ¶
func (cont *TokenContract) SetGateway(cc *types.ContractContext, Gateway common.Address, Is bool) error
func (*TokenContract) SetMinter ¶
func (cont *TokenContract) SetMinter(cc *types.ContractContext, To common.Address, Is bool) error
func (*TokenContract) SetName ¶
func (cont *TokenContract) SetName(cc *types.ContractContext, name string) error
func (*TokenContract) SetRouter ¶
func (cont *TokenContract) SetRouter(cc *types.ContractContext, router common.Address, path []common.Address) error
func (*TokenContract) SetSymbol ¶
func (cont *TokenContract) SetSymbol(cc *types.ContractContext, symbol string) error
func (*TokenContract) SetTokenManager ¶
func (cont *TokenContract) SetTokenManager(cc *types.ContractContext, To common.Address, Is bool) error
func (*TokenContract) SetVersion ¶
func (cont *TokenContract) SetVersion(cc *types.ContractContext, version uint8) error
func (*TokenContract) SubCollectedFee ¶
func (cont *TokenContract) SubCollectedFee(cc *types.ContractContext, am *amount.Amount) error
func (*TokenContract) SwapToMainToken ¶
func (cont *TokenContract) SwapToMainToken(cc *types.ContractContext, amt *amount.Amount) (*amount.Amount, error)
func (*TokenContract) Symbol ¶
func (cont *TokenContract) Symbol(cc types.ContractLoader) string
func (*TokenContract) TokenInRevert ¶
func (cont *TokenContract) TokenInRevert(cc *types.ContractContext, Platform string, ercHash string, to common.Address, Amount *amount.Amount) error
func (*TokenContract) TotalSupply ¶
func (cont *TokenContract) TotalSupply(cc types.ContractLoader) *amount.Amount
func (*TokenContract) Transfer ¶
func (cont *TokenContract) Transfer(cc *types.ContractContext, To common.Address, Amount *amount.Amount) error
func (*TokenContract) TransferFrom ¶
func (cont *TokenContract) TransferFrom(cc *types.ContractContext, From common.Address, To common.Address, Amount *amount.Amount) error
func (*TokenContract) Unpause ¶
func (cont *TokenContract) Unpause(cc *types.ContractContext) error
func (*TokenContract) Version ¶
func (cont *TokenContract) Version(cc *types.ContractContext) uint8
type TokenContractConstruction ¶
type TokenContractConstruction struct { Name string Symbol string // FeeTokenAddress common.Address InitialSupplyMap map[common.Address]*amount.Amount Version uint8 }
Click to show internal directories.
Click to hide internal directories.