ContractMetadata.update() method
Update the metadata of a contract
Example
await contract.metadata.update({
name: "My Contract",
description: "My contract description",
});
Signature:
update(metadata: Partial<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
Parameter | Type | Description |
---|---|---|
metadata | Partial<z.input<TSchema["input"]>> | the metadata to update |
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
Update the metadata of a contract