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.
Extends
Section titled “Extends”BaseContractMethod
<A
,R
,D
>
Type Parameters
Section titled “Type Parameters”Type Parameter | Default type |
---|---|
A extends any [] | any [] |
R | any |
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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |
Returns
Section titled “Returns”Promise
<D
>
Properties
Section titled “Properties”fragment
Section titled “fragment”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.
Inherited from
Section titled “Inherited from”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.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”estimateGas()
Section titled “estimateGas()”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%%.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |
Returns
Section titled “Returns”Promise
<bigint
>
Inherited from
Section titled “Inherited from”BaseContractMethod
.estimateGas
getFragment()
Section titled “getFragment()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”BaseContractMethod
.getFragment
populateTransaction()
Section titled “populateTransaction()”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%%.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”BaseContractMethod
.populateTransaction
send()
Section titled “send()”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%%.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |
Returns
Section titled “Returns”Promise
<ContractTransactionResponse
>
Inherited from
Section titled “Inherited from”staticCall()
Section titled “staticCall()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |
Returns
Section titled “Returns”Promise
<R
>
Inherited from
Section titled “Inherited from”staticCallResult()
Section titled “staticCallResult()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
…args | ContractMethodArgs <A > |