Skip to main content

UpgradeCap

UpgradeCap Objects

class UpgradeCap(UpgradeCapProtocol)

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

try_from_bcs

@classmethod
def try_from_bcs(cls, bytes: bytes) -> UpgradeCap

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

try_from_object

@classmethod
def try_from_object(cls, object: Object) -> UpgradeCap

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

id

def id() -> ObjectId

The object's ID.

package

def package() -> ObjectId

ID of the package that can be upgraded.

policy

def policy() -> int

What kind of upgrades are allowed.

version

def version() -> int

Number of upgrades applied to the original package.