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, http, Zone } from 'viem/tempo'
export const client = createClient({
account: privateKeyToAccount('0x...'),
chain: Zone.a,
transport: http(),
})Custom Gas Limit
import { client } from './zones.config'
const fee = await client.zone.getWithdrawalFee({
callbackGas: 100_000n,
})Return Type
type ReturnType = bigintThe withdrawal fee as a bigint.
Parameters
callbackGas (optional)
- Type:
bigint - Default:
0n
Gas limit for the withdrawal callback on the parent chain.