Documentation ¶
Index ¶
- Variables
- type BurnFromParams
- type BurnFromReturn
- type BurnParams
- type BurnReturn
- type DecreaseAllowanceParams
- type DestroyParams
- type GetAllowanceParams
- type IncreaseAllowanceParams
- type MintParams
- type MintReturn
- type RevokeAllowanceParams
- type State
- type StateSummary
- type TokenState
- type TransferFromParams
- type TransferFromReturn
- type TransferParams
- type TransferReturn
Constants ¶
This section is empty.
Variables ¶
View Source
var InfiniteAllowance = big.Mul(big.MustFromString("1000000000000000000000"), builtin.TokenPrecision)
View Source
var Methods = map[abi.MethodNum]builtin.MethodMeta{ 1: {"Constructor", *new(func(*address.Address) *abi.EmptyValue)}, 2: {"Mint", *new(func(*MintParams) *MintReturn)}, 3: {"Destroy", *new(func(*DestroyParams) *BurnReturn)}, 10: {"Name", *new(func(*abi.EmptyValue) *abi.CborString)}, 11: {"Symbol", *new(func(*abi.EmptyValue) *abi.CborString)}, 12: {"TotalSupply", *new(func(*abi.EmptyValue) *abi.TokenAmount)}, 13: {"BalanceOf", *new(func(*address.Address) *abi.TokenAmount)}, 14: {"Transfer", *new(func(*TransferParams) *TransferReturn)}, 15: {"TransferFrom", *new(func(*TransferFromParams) *TransferFromReturn)}, 16: {"IncreaseAllowance", *new(func(*IncreaseAllowanceParams) *abi.TokenAmount)}, 17: {"DecreaseAllowance", *new(func(*DecreaseAllowanceParams) *abi.TokenAmount)}, 18: {"RevokeAllowance", *new(func(*RevokeAllowanceParams) *abi.TokenAmount)}, 19: {"Burn", *new(func(*BurnParams) *BurnReturn)}, 20: {"BurnFrom", *new(func(*BurnFromParams) *BurnFromReturn)}, 21: {"Allowance", *new(func(*GetAllowanceParams) *abi.TokenAmount)}, }
Functions ¶
This section is empty.
Types ¶
type BurnFromParams ¶
type BurnFromParams struct { Owner address.Address Amount abi.TokenAmount }
func (*BurnFromParams) MarshalCBOR ¶
func (t *BurnFromParams) MarshalCBOR(w io.Writer) error
func (*BurnFromParams) UnmarshalCBOR ¶
func (t *BurnFromParams) UnmarshalCBOR(r io.Reader) (err error)
type BurnFromReturn ¶
type BurnFromReturn struct { Balance abi.TokenAmount Allowance abi.TokenAmount }
func (*BurnFromReturn) MarshalCBOR ¶
func (t *BurnFromReturn) MarshalCBOR(w io.Writer) error
func (*BurnFromReturn) UnmarshalCBOR ¶
func (t *BurnFromReturn) UnmarshalCBOR(r io.Reader) (err error)
type BurnParams ¶
type BurnParams struct {
Amount abi.TokenAmount
}
func (*BurnParams) MarshalCBOR ¶
func (t *BurnParams) MarshalCBOR(w io.Writer) error
func (*BurnParams) UnmarshalCBOR ¶
func (t *BurnParams) UnmarshalCBOR(r io.Reader) (err error)
type BurnReturn ¶
type BurnReturn struct {
Balance abi.TokenAmount
}
func (*BurnReturn) MarshalCBOR ¶
func (t *BurnReturn) MarshalCBOR(w io.Writer) error
func (*BurnReturn) UnmarshalCBOR ¶
func (t *BurnReturn) UnmarshalCBOR(r io.Reader) (err error)
type DecreaseAllowanceParams ¶
type DecreaseAllowanceParams struct { Operator address.Address Decrease abi.TokenAmount }
func (*DecreaseAllowanceParams) MarshalCBOR ¶
func (t *DecreaseAllowanceParams) MarshalCBOR(w io.Writer) error
func (*DecreaseAllowanceParams) UnmarshalCBOR ¶
func (t *DecreaseAllowanceParams) UnmarshalCBOR(r io.Reader) (err error)
type DestroyParams ¶
type DestroyParams struct { Owner address.Address Amount abi.TokenAmount }
func (*DestroyParams) MarshalCBOR ¶
func (t *DestroyParams) MarshalCBOR(w io.Writer) error
func (*DestroyParams) UnmarshalCBOR ¶
func (t *DestroyParams) UnmarshalCBOR(r io.Reader) (err error)
type GetAllowanceParams ¶
type GetAllowanceParams struct { Owner address.Address Operator address.Address }
func (*GetAllowanceParams) MarshalCBOR ¶
func (t *GetAllowanceParams) MarshalCBOR(w io.Writer) error
func (*GetAllowanceParams) UnmarshalCBOR ¶
func (t *GetAllowanceParams) UnmarshalCBOR(r io.Reader) (err error)
type IncreaseAllowanceParams ¶
type IncreaseAllowanceParams struct { Operator address.Address Increase abi.TokenAmount }
func (*IncreaseAllowanceParams) MarshalCBOR ¶
func (t *IncreaseAllowanceParams) MarshalCBOR(w io.Writer) error
func (*IncreaseAllowanceParams) UnmarshalCBOR ¶
func (t *IncreaseAllowanceParams) UnmarshalCBOR(r io.Reader) (err error)
type MintParams ¶
type MintParams struct { To address.Address Amount abi.TokenAmount Operators []address.Address }
func (*MintParams) MarshalCBOR ¶
func (t *MintParams) MarshalCBOR(w io.Writer) error
func (*MintParams) UnmarshalCBOR ¶
func (t *MintParams) UnmarshalCBOR(r io.Reader) (err error)
type MintReturn ¶
type MintReturn struct { Balance abi.TokenAmount Supply abi.TokenAmount RecipientData []byte }
func (*MintReturn) MarshalCBOR ¶
func (t *MintReturn) MarshalCBOR(w io.Writer) error
func (*MintReturn) UnmarshalCBOR ¶
func (t *MintReturn) UnmarshalCBOR(r io.Reader) (err error)
type RevokeAllowanceParams ¶
type RevokeAllowanceParams struct {
Operator address.Address
}
func (*RevokeAllowanceParams) MarshalCBOR ¶
func (t *RevokeAllowanceParams) MarshalCBOR(w io.Writer) error
func (*RevokeAllowanceParams) UnmarshalCBOR ¶
func (t *RevokeAllowanceParams) UnmarshalCBOR(r io.Reader) (err error)
type StateSummary ¶ added in v0.9.3
type StateSummary struct { Balances map[abi.ActorID]abi.TokenAmount Allowances map[abi.ActorID]map[abi.ActorID]abi.TokenAmount TotalSupply abi.TokenAmount }
func CheckStateInvariants ¶ added in v0.9.3
func CheckStateInvariants(st *State, store adt.Store) (*StateSummary, *builtin.MessageAccumulator)
Checks internal invariants of verified registry state.
type TokenState ¶
type TokenState struct { Supply abi.TokenAmount Balances cid.Cid // HAMT abi.ActorID[abi.TokenAmount] Allowances cid.Cid // HAMT abi.ActorID[abi.ActorID[abi.TokenAmount]] HamtBitWidth uint64 // uint32 in builtin-actors. uint64 here to satisfy cbor-gen }
func (*TokenState) MarshalCBOR ¶
func (t *TokenState) MarshalCBOR(w io.Writer) error
func (*TokenState) UnmarshalCBOR ¶
func (t *TokenState) UnmarshalCBOR(r io.Reader) (err error)
type TransferFromParams ¶
type TransferFromParams struct { From address.Address To address.Address Amount abi.TokenAmount OperatorData []byte }
func (*TransferFromParams) MarshalCBOR ¶
func (t *TransferFromParams) MarshalCBOR(w io.Writer) error
func (*TransferFromParams) UnmarshalCBOR ¶
func (t *TransferFromParams) UnmarshalCBOR(r io.Reader) (err error)
type TransferFromReturn ¶
type TransferFromReturn struct { FromBalance abi.TokenAmount ToBalance abi.TokenAmount Allowance abi.TokenAmount RecipientData []byte }
func (*TransferFromReturn) MarshalCBOR ¶
func (t *TransferFromReturn) MarshalCBOR(w io.Writer) error
func (*TransferFromReturn) UnmarshalCBOR ¶
func (t *TransferFromReturn) UnmarshalCBOR(r io.Reader) (err error)
type TransferParams ¶
type TransferParams struct { To address.Address Amount abi.TokenAmount OperatorData []byte }
func (*TransferParams) MarshalCBOR ¶
func (t *TransferParams) MarshalCBOR(w io.Writer) error
func (*TransferParams) UnmarshalCBOR ¶
func (t *TransferParams) UnmarshalCBOR(r io.Reader) (err error)
type TransferReturn ¶
type TransferReturn struct { FromBalance abi.TokenAmount ToBalance abi.TokenAmount RecipientData []byte }
func (*TransferReturn) MarshalCBOR ¶
func (t *TransferReturn) MarshalCBOR(w io.Writer) error
func (*TransferReturn) UnmarshalCBOR ¶
func (t *TransferReturn) UnmarshalCBOR(r io.Reader) (err error)
Click to show internal directories.
Click to hide internal directories.