Skip to main content

UpgradeCap

type UpgradeCap

A typed view of an on-chain `0x2:📦:UpgradeCap` object.

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

func LiftFromExternalUpgradeCap

func LiftFromExternalUpgradeCap(handle uint64) *UpgradeCap

func UpgradeCapTryFromBcs

func UpgradeCapTryFromBcs(bytes []byte) (*UpgradeCap, error)

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

func UpgradeCapTryFromObject

func UpgradeCapTryFromObject(object *Object) (*UpgradeCap, error)

Decode from an on-chain object, validating its Move type tag.

func (*UpgradeCap) DebugString

func (_self *UpgradeCap) DebugString() string

func (*UpgradeCap) Destroy

func (object *UpgradeCap) Destroy()

func (*UpgradeCap) Id

func (_self *UpgradeCap) Id() *ObjectId

The object's ID.

func (*UpgradeCap) Package

func (_self *UpgradeCap) Package() *ObjectId

ID of the package that can be upgraded.

func (*UpgradeCap) Policy

func (_self *UpgradeCap) Policy() uint8

What kind of upgrades are allowed.

func (*UpgradeCap) Version

func (_self *UpgradeCap) Version() uint64

Number of upgrades applied to the original package.