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
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(contractWrapper, schema, storage) | Constructs a new instance of the ContractMetadata class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| featureName | "ContractMetadata" |
Methods
| Method | Modifiers | Description |
|---|---|---|
| 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