Skip to main content

ContractMetadata class

Handles metadata for a Contract

Example

const contract = await sdk.getContract("{{contract_address}}");
const metadata = await contract.metadata.get();
await contract.metadata.set({
name: "My Contract",
description: "My contract description",
});

Constructors

ConstructorModifiersDescription
(constructor)(contractWrapper, schema, storage)Constructs a new instance of the ContractMetadata class

Properties

PropertyModifiersTypeDescription
featureName"ContractMetadata"

Methods

MethodModifiersDescription
get()Get the metadata of a contract
set(metadata)Set the metadata of a contract
update(metadata)Update the metadata of a contract

Signature:

export declare class ContractMetadata<TContract extends BaseContract, TSchema extends IGenericSchemaType> implements DetectableFeature

Implements: DetectableFeature

Remarks

Read and update metadata for this contract