Skip to content

ContractMethod

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:130

A contract method on a Contract.

Type ParameterDefault type
A extends any[]any[]
Rany
D extends | R | ContractTransactionResponse| R | ContractTransactionResponse
ContractMethod(...args): Promise<D>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:130

A contract method on a Contract.

ParameterType
argsContractMethodArgs<A>

Promise<D>

fragment: FunctionFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:95

The fragment of the Contract method. This will throw on ambiguous method names.

BaseContractMethod.fragment


name: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:90

The name of the Contract method.

BaseContractMethod.name

estimateGas(...args): Promise<bigint>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:120

Estimate the gas to send the contract method with %%args%%.

ParameterType
argsContractMethodArgs<A>

Promise<bigint>

BaseContractMethod.estimateGas


getFragment(...args): FunctionFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:100

Returns the fragment constrained by %%args%%. This can be used to resolve ambiguous method names.

ParameterType
argsContractMethodArgs<A>

FunctionFragment

BaseContractMethod.getFragment


populateTransaction(...args): Promise<ContractTransaction>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:105

Returns a populated transaction that can be used to perform the contract method with %%args%%.

ParameterType
argsContractMethodArgs<A>

Promise<ContractTransaction>

BaseContractMethod.populateTransaction


send(...args): Promise<ContractTransactionResponse>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:116

Send a transaction for the contract method with %%args%%.

ParameterType
argsContractMethodArgs<A>

Promise<ContractTransactionResponse>

BaseContractMethod.send


staticCall(...args): Promise<R>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:112

Call the contract method with %%args%% and return the value.

If the return value is a single type, it will be dereferenced and returned directly, otherwise the full Result will be returned.

ParameterType
argsContractMethodArgs<A>

Promise<R>

BaseContractMethod.staticCall


staticCallResult(...args): Promise<Result>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/contract/types.d.ts:125

Call the contract method with %%args%% and return the Result without any dereferencing.

ParameterType
argsContractMethodArgs<A>

Promise<Result>

BaseContractMethod.staticCallResult