Skip to main content

ContractMetadata.set() method

Set the metadata of a contract

Example

await contract.metadata.set({
name: "My Contract",
description: "My contract description",
});

Signature:

set(metadata: z.input<TSchema["input"]>): Promise<((<A>() => A extends never ? 1 : 0) extends <A_1>() => A_1 extends z.output<TSchema["output"]> ? 1 : 0 ? 1 : 0) extends infer T ? T extends ((<A>() => A extends never ? 1 : 0) extends <A_1>() => A_1 extends z.output<TSchema["output"]> ? 1 : 0 ? 1 : 0) ? T extends 1 ? Omit<{
receipt: import("@ethersproject/abstract-provider").TransactionReceipt;
data: () => Promise<unknown>;
}, "data"> : {
receipt: import("@ethersproject/abstract-provider").TransactionReceipt;
data: () => Promise<z.output<TSchema["output"]>>;
} : never : never>;

Parameters

ParameterTypeDescription
metadataz.input<TSchema["input"]>the metadata to set

Returns:

Promise<((<A>() => A extends never ? 1 : 0) extends <A_1>() => A_1 extends z.output<TSchema["output"]> ? 1 : 0 ? 1 : 0) extends infer T ? T extends ((<A>() => A extends never ? 1 : 0) extends <A_1>() => A_1 extends z.output<TSchema["output"]> ? 1 : 0 ? 1 : 0) ? T extends 1 ? Omit<{ receipt: import("@ethersproject/abstract-provider").TransactionReceipt; data: () => Promise<unknown>; }, "data"> : { receipt: import("@ethersproject/abstract-provider").TransactionReceipt; data: () => Promise<z.output<TSchema["output"]>>; } : never : never>

Remarks

OVERWRITE the metadata of a contract