Skip to main content

UpgradeCap

Namespace: IotaSdk

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

public class UpgradeCap : IUpgradeCap, System.IDisposable

Inheritance Object → UpgradeCap
Implements IUpgradeCap, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors​

UpgradeCap(UInt64)​

public UpgradeCap(ulong pointer)

Parameters​

pointer UInt64

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

Id()​

The object's ID.

public ObjectId Id()

Returns​

ObjectId

Package()​

ID of the package that can be upgraded.

public ObjectId Package()

Returns​

ObjectId

Policy()​

What kind of upgrades are allowed.

public byte Policy()

Returns​

Byte

Version()​

Number of upgrades applied to the original package.

public ulong Version()

Returns​

UInt64

TryFromBcs(Byte[])​

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

public static UpgradeCap TryFromBcs(Byte[] bytes)

Parameters​

bytes Byte[]

Returns​

UpgradeCap

Exceptions​

SdkFfiException

TryFromObject(Object)​

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

public static UpgradeCap TryFromObject(Object object)

Parameters​

object Object

Returns​

UpgradeCap

Exceptions​

SdkFfiException