Skip to main content

TreasuryCap

type TreasuryCap

A typed view of an on-chain `0x2::coin::TreasuryCap<T>` object, the capability controlling a coin type's supply.

type TreasuryCap struct {
// contains filtered or unexported fields
}

func LiftFromExternalTreasuryCap

func LiftFromExternalTreasuryCap(handle uint64) *TreasuryCap

func TreasuryCapTryFromBcs

func TreasuryCapTryFromBcs(bytes []byte) (*TreasuryCap, error)

Decode from BCS bytes, without validating the on-chain type tag.

func TreasuryCapTryFromObjectWithType

func TreasuryCapTryFromObjectWithType(object *Object, typeParam *TypeTag) (*TreasuryCap, error)

Decode from an on-chain object, validating its Move type tag, including that its type parameter equals `type_param`.

func (*TreasuryCap) DebugString

func (_self *TreasuryCap) DebugString() string

func (*TreasuryCap) Destroy

func (object *TreasuryCap) Destroy()

func (*TreasuryCap) Id

func (_self *TreasuryCap) Id() *ObjectId

The object's ID.

func (*TreasuryCap) TotalSupply

func (_self *TreasuryCap) TotalSupply() uint64

Total supply of the coin currently in circulation, in base units.