ccip_get_fee
Estimate CCIP cross-chain messaging fee via Router.getFee() eth_call. Returns the native fee required to send a CCIP message from the source chain to the destination chain. Supports Ethereum, Base, and Arbitrum as source chains.
Parameters6
| src_chain_id | string | required | Source chain identifier: 'ethereum', 'base', 'arbitrum', or a chain ID number |
| dst_chain_selector | string | required | Destination CCIP chain selector (uint64). E.g. 4949039107694359620 for Arbitrum |
| receiver | string | required | Hex-encoded receiver address on the destination chain (with or without 0x prefix) |
| data_hex | string | null | optional | Hex-encoded data payload to send (with or without 0x prefix). Use '0x' or '' for empty |
| token_amounts | array | null | optional | Token amounts to transfer as JSON array of {token, amount} objects. Empty array for message-only |
| fee_token | string | null | optional | Fee token address. Use zero address (0x0000...0000) for native gas token payment |
Raw schema
{
"type": "object",
"properties": {
"src_chain_id": {
"description": "Source chain identifier: 'ethereum', 'base', 'arbitrum', or a chain ID number",
"type": "string"
},
"dst_chain_selector": {
"description": "Destination CCIP chain selector (uint64). E.g. 4949039107694359620 for Arbitrum",
"type": "string"
},
"receiver": {
"description": "Hex-encoded receiver address on the destination chain (with or without 0x prefix)",
"type": "string"
},
"data_hex": {
"description": "Hex-encoded data payload to send (with or without 0x prefix). Use '0x' or '' for empty",
"type": [
"string",
"null"
]
},
"token_amounts": {
"description": "Token amounts to transfer as JSON array of {token, amount} objects. Empty array for message-only",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/TokenAmountParam"
}
},
"fee_token": {
"description": "Fee token address. Use zero address (0x0000...0000) for native gas token payment",
"type": [
"string",
"null"
]
}
},
"required": [
"src_chain_id",
"dst_chain_selector",
"receiver"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "CcipGetFeeParams",
"$defs": {
"TokenAmountParam": {
"type": "object",
"properties": {
"token": {
"description": "Token contract address (hex with 0x prefix)",
"type": "string"
},
"amount": {
"description": "Amount in token base units (uint256 as decimal string)",
"type": "string"
}
},
"required": [
"token",
"amount"
]
}
}
}