> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Estimate Gas \[contract.estimateGas]

Estimates the gas required to successfully execute a contract write (`nonpayable`/`payable`) function call.

The action encodes the call with [`AbiFunction.encodeData`](/docs/utilities/abifunction/encodeData) and delegates to [estimateGas](/docs/actions/public/transaction/estimateGas).

Reverts are mapped to `ContractError.ContractFunctionExecutionError` with the decoded revert reason when available.

## Usage

This example estimates the gas required to successfully execute a contract write (`nonpayable`/`payable`) function call.

:::code-group
```ts twoslash [example.ts]
import { Abi } from 'viem/utils'
import { client } from './viem.config'

const gas = await client.contract.estimateGas({
  abi: Abi.from(['function mint()']),
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  functionName: 'mint',
})
// @log: 69420n
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, http, publicActions } from 'viem'
import { mainnet } from 'viem/chains'

export const client = Client.create({
  chain: mainnet,
  transport: http(),
}).extend(publicActions())
```
:::

### Standalone Action

Call `Actions.contract.estimateGas` directly by passing the Client as the first argument.

:::code-group
```ts twoslash [example.ts]
import { Actions } from 'viem'
import { Abi } from 'viem/utils'
import { client } from './viem.config'

const gas = await Actions.contract.estimateGas(client, {
  abi: Abi.from(['function mint()']),
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  functionName: 'mint',
})
// @log: 69420n
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, http } from 'viem'
import { mainnet } from 'viem/chains'

export const client = Client.create({
  chain: mainnet,
  transport: http(),
})
```
:::

## Recipes

### Estimate a Payable Call

Pass `value` to include the native currency sent by a payable function.

```ts twoslash
import { Client, http, publicActions } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({
  chain: mainnet,
  transport: http(),
}).extend(publicActions())

const gas = await client.contract.estimateGas({
  abi: Abi.from(['function deposit() payable']),
  account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'deposit',
  value: 1n, // [!code focus]
})
```

### Estimate Against Historical State

Combine a block number with state overrides to estimate against temporary historical state.

```ts twoslash
import { Client, http, publicActions } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({
  chain: mainnet,
  transport: http(),
}).extend(publicActions())

const account = '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'
const gas = await client.contract.estimateGas({
  abi: Abi.from(['function mint()']),
  account,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blockNumber: 19_760_235n, // [!code focus]
  functionName: 'mint',
  stateOverride: { // [!code focus]
    [account]: { // [!code focus]
      balance: 1000000000000000000n, // [!code focus]
    }, // [!code focus]
  }, // [!code focus]
})
```

### Estimate a Blob Call

Provide blobs and a [KZG context](/docs/utilities/kzg/from) when the contract call uses an EIP-4844 transaction.

```ts twoslash
import { Client, http, publicActions } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi, Kzg } from 'viem/utils'

declare const kzg: Kzg.Kzg

const client = Client.create({
  chain: mainnet,
  transport: http(),
}).extend(publicActions())

const gas = await client.contract.estimateGas({
  abi: Abi.from(['function mint()']),
  account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blobs: ['0x1234'], // [!code focus]
  functionName: 'mint',
  kzg, // [!code focus]
  maxFeePerBlobGas: 1_000_000_000n, // [!code focus]
  type: 'eip4844', // [!code focus]
})
```

## Return Value

`bigint`

The gas units required to execute the function call.

## Parameters

### abi

* **Type:** `Abi`

The contract's ABI. The `functionName` and `args` are inferred from it.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi: Abi.from(['function mint()']), // [!code focus]
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  functionName: 'mint',
})
```

### accessList

* **Type:** `AccessList`

The EIP-2930 access list to attach to the call.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  accessList: [ // [!code focus]
    { // [!code focus]
      address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', // [!code focus]
      storageKeys: [ // [!code focus]
        '0x0000000000000000000000000000000000000000000000000000000000000001', // [!code focus]
      ], // [!code focus]
    }, // [!code focus]
  ], // [!code focus]
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
})
```

### account

* **Type:** `Account | Address`
* **Default:** `client.account`

The Account object or address that supplies `msg.sender` for the estimate.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', // [!code focus]
  functionName: 'mint',
})
```

### address

* **Type:** `Address`

The address of the contract.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', // [!code focus]
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  functionName: 'mint',
})
```

### args

* **Type:** Inferred from `abi` and `functionName`.

The arguments to pass to the contract function.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abis } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi: Abis.erc20,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', 1n], // [!code focus]
  functionName: 'transfer',
})
```

### authorizationList

* **Type:** `AuthorizationList`

The signed EIP-7702 authorization list to attach to the call.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  authorizationList: [ // [!code focus]
    { // [!code focus]
      address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', // [!code focus]
      chainId: 1, // [!code focus]
      nonce: 0n, // [!code focus]
      r: '0x...', // [!code focus]
      s: '0x...', // [!code focus]
      yParity: 0, // [!code focus]
    }, // [!code focus]
  ], // [!code focus]
  functionName: 'mint',
})
```

### blobs

* **Type:** `readonly Hex[]`

The blobs to attach to the call (EIP-4844).

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blobs: ['0x1234'], // [!code focus]
  functionName: 'mint',
})
```

### blobVersionedHashes

* **Type:** `readonly Hex[]`

The EIP-4844 versioned hashes for the attached blobs.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blobVersionedHashes: ['0x...'], // [!code focus]
  functionName: 'mint',
})
```

### blockHash

* **Type:** `Hex`

The hash of the block whose state to use for the estimate.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blockHash: '0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d', // [!code focus]
  functionName: 'mint',
})
```

### blockNumber

* **Type:** `bigint`

The number of the block whose state to use for the estimate.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blockNumber: 42069n, // [!code focus]
  functionName: 'mint',
})
```

### blockTag

* **Type:** `'latest' | 'earliest' | 'pending' | 'safe' | 'finalized'`
* **Default:** `client.blockTag ?? 'latest'`

The block tag whose state to use for the estimate.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blockTag: 'pending', // [!code focus]
  functionName: 'mint',
})
```

### chainId

* **Type:** `number | Hex`

The EIP-155 chain ID to include in the call request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  chainId: 1, // [!code focus]
  functionName: 'mint',
})
```

### dataSuffix

* **Type:** `Hex`

Data to append to the end of the encoded calldata. Takes precedence over the Client's
[`dataSuffix`](/docs/clients/create#optionsdatasuffix).

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  dataSuffix: '0xdeadbeef', // [!code focus]
  functionName: 'mint',
})
```

### from

* **Type:** `Address`

The sender address to use when neither `account` nor `client.account` is set.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  from: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', // [!code focus]
  functionName: 'mint',
})
```

### functionName

* **Type:** Inferred from `abi`.

The name of the function to call on the contract.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  functionName: 'mint', // [!code focus]
})
```

### gas

* **Type:** `bigint | number | Hex`

The gas limit to include in the estimation request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  gas: 1_000_000n, // [!code focus]
})
```

### gasPrice

* **Type:** `bigint | number | Hex`

The gas price for a legacy or EIP-2930 request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  gasPrice: 20_000_000_000n, // [!code focus]
})
```

### kzg

* **Type:** `Kzg`

The KZG context used to derive versioned hashes from [`blobs`](#blobs).

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi, Kzg } from 'viem/utils'

declare const kzg: Kzg.Kzg
const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blobs: ['0x1234'],
  functionName: 'mint',
  kzg, // [!code focus]
})
```

### maxFeePerBlobGas

* **Type:** `bigint | number | Hex`

The maximum fee per blob gas for an EIP-4844 request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  maxFeePerBlobGas: 1_000_000_000n, // [!code focus]
})
```

### maxFeePerGas

* **Type:** `bigint | number | Hex`

The maximum total fee per gas for an EIP-1559 request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  maxFeePerGas: 20_000_000_000n, // [!code focus]
})
```

### maxPriorityFeePerGas

* **Type:** `bigint | number | Hex`

The maximum priority fee per gas for an EIP-1559 request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  maxPriorityFeePerGas: 1_000_000_000n, // [!code focus]
})
```

### nonce

* **Type:** `bigint | number | Hex`

The nonce to use for the sender.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  nonce: 69, // [!code focus]
})
```

### requestOptions

* **Type:** `{ dedupe?: boolean; signal?: AbortSignal; ... }`

The options to pass to the underlying transport request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
const controller = new AbortController()
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  requestOptions: { signal: controller.signal }, // [!code focus]
})
```

### requireCanonical

* **Type:** `boolean`
* **Default:** `false`

Whether the block selected by [`blockHash`](#blockhash) must be in the canonical chain.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  blockHash: '0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d',
  functionName: 'mint',
  requireCanonical: true, // [!code focus]
})
```

### stateOverride

* **Type:** `StateOverrides`

The account state to override for the estimate.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  stateOverride: { // [!code focus]
    '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266': { // [!code focus]
      balance: 1_000_000_000_000_000_000n, // [!code focus]
    }, // [!code focus]
  }, // [!code focus]
})
```

### type

* **Type:** `string`

The transaction type to use for the estimation request.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
const abi = Abi.from(['function mint()'])
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi,
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  functionName: 'mint',
  type: 'eip1559', // [!code focus]
})
```

### value

* **Type:** `bigint | number | Hex`

Value (in wei) sent with the call. Only available on `payable` functions.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Abi } from 'viem/utils'

const client = Client.create({ chain: mainnet, transport: http() })
// ---cut---
const gas = await Actions.contract.estimateGas(client, {
  abi: Abi.from(['function mint() payable']),
  address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
  account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
  functionName: 'mint',
  value: 1n, // [!code focus]
})
```

## Errors

| Error | Description |
| --- | --- |
| `ContractError.ContractFunctionExecutionError` | The contract function could not be executed. Its `cause` is `ContractError.ContractFunctionRevertedError` when the call reverts. |
