zone.getWithdrawalFee
Returns the withdrawal fee.
Usage
import { client } from './zones.config'
const fee = await client.zone.getWithdrawalFee()
console.log('Fee:', fee)
Fee: 1000000nimport { privateKeyToAccount } from 'viem/accounts'
import { createClient } from 'viem/tempo'
import { http, zoneModerato } from 'viem/tempo/zones'
export const client = createClient({
account: privateKeyToAccount('0x...'),
chain: zoneModerato(7),
transport: http(),
})Custom Gas Limit
import { client } from './zones.config'
const fee = await client.zone.getWithdrawalFee({
gas: 100_000n,
})Return Type
type ReturnType = bigintThe withdrawal fee as a bigint.
Parameters
gas (optional)
- Type:
bigint - Default:
0n
Gas limit for the withdrawal callback on the parent chain.