Documentation ¶
Index ¶
- Variables
- type BurnFromParams
- type BurnFromReturn
- type BurnParams
- type BurnReturn
- type DecreaseAllowanceParams
- type DestroyParams
- type GetAllowanceParams
- type GranularityReturn
- 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: builtin.NewMethodMeta("Constructor", *new(func(*address.Address) *abi.EmptyValue)), builtin.MustGenerateFRCMethodNum("Mint"): builtin.NewMethodMeta("MintExported", *new(func(*MintParams) *MintReturn)), builtin.MustGenerateFRCMethodNum("Destroy"): builtin.NewMethodMeta("DestroyExported", *new(func(*DestroyParams) *BurnReturn)), builtin.MustGenerateFRCMethodNum("Name"): builtin.NewMethodMeta("NameExported", *new(func(*abi.EmptyValue) *abi.CborString)), builtin.MustGenerateFRCMethodNum("Symbol"): builtin.NewMethodMeta("SymbolExported", *new(func(*abi.EmptyValue) *abi.CborString)), builtin.MustGenerateFRCMethodNum("TotalSupply"): builtin.NewMethodMeta("TotalSupplyExported", *new(func(*abi.EmptyValue) *abi.TokenAmount)), builtin.MustGenerateFRCMethodNum("Balance"): builtin.NewMethodMeta("BalanceExported", *new(func(*address.Address) *abi.TokenAmount)), builtin.MustGenerateFRCMethodNum("Transfer"): builtin.NewMethodMeta("TransferExported", *new(func(*TransferParams) *TransferReturn)), builtin.MustGenerateFRCMethodNum("TransferFrom"): builtin.NewMethodMeta("TransferFromExported", *new(func(*TransferFromParams) *TransferFromReturn)), builtin.MustGenerateFRCMethodNum("IncreaseAllowance"): builtin.NewMethodMeta("IncreaseAllowanceExported", *new(func(*IncreaseAllowanceParams) *abi.TokenAmount)), builtin.MustGenerateFRCMethodNum("DecreaseAllowance"): builtin.NewMethodMeta("DecreaseAllowanceExported", *new(func(*DecreaseAllowanceParams) *abi.TokenAmount)), builtin.MustGenerateFRCMethodNum("RevokeAllowance"): builtin.NewMethodMeta("RevokeAllowanceExported", *new(func(*RevokeAllowanceParams) *abi.TokenAmount)), builtin.MustGenerateFRCMethodNum("Burn"): builtin.NewMethodMeta("BurnExported", *new(func(*BurnParams) *BurnReturn)), builtin.MustGenerateFRCMethodNum("BurnFrom"): builtin.NewMethodMeta("BurnFromExported", *new(func(*BurnFromParams) *BurnFromReturn)), builtin.MustGenerateFRCMethodNum("Allowance"): builtin.NewMethodMeta("AllowanceExported", *new(func(*GetAllowanceParams) *abi.TokenAmount)), builtin.MustGenerateFRCMethodNum("Granularity"): builtin.NewMethodMeta("GranularityExported", *new(func(value *abi.EmptyValue) *GranularityReturn)), }
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 GranularityReturn ¶
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 ¶
type StateSummary struct { Balances map[abi.ActorID]abi.TokenAmount Allowances map[abi.ActorID]map[abi.ActorID]abi.TokenAmount TotalSupply abi.TokenAmount }
func CheckStateInvariants ¶
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.