From 3788148e82dd2228c7744763abadc7cba996adea Mon Sep 17 00:00:00 2001 From: SyedAsadKazmi Date: Wed, 12 Nov 2025 16:45:49 +0530 Subject: [PATCH 1/3] Add Events API Reference --- src/config/data/ccip/data.ts | 63 +++++++++++ src/config/data/ccip/events/v1_5_0/index.ts | 3 + .../ccip/events/v1_5_0/offramp-receive.json | 43 +++++++ .../data/ccip/events/v1_5_0/onramp-send.json | 23 ++++ .../data/ccip/events/v1_5_0/pool-receive.json | 54 +++++++++ .../data/ccip/events/v1_5_0/pool-send.json | 49 ++++++++ .../ccip/events/v1_5_0/router-receive.json | 28 +++++ src/config/data/ccip/events/v1_5_1/index.ts | 5 + .../ccip/events/v1_5_1/offramp-receive.json | 43 +++++++ .../data/ccip/events/v1_5_1/onramp-send.json | 23 ++++ .../data/ccip/events/v1_5_1/pool-receive.json | 54 +++++++++ .../data/ccip/events/v1_5_1/pool-send.json | 49 ++++++++ .../ccip/events/v1_5_1/router-receive.json | 28 +++++ src/config/data/ccip/events/v1_6_0/index.ts | 5 + .../ccip/events/v1_6_0/offramp-receive.json | 43 +++++++ .../data/ccip/events/v1_6_0/onramp-send.json | 23 ++++ .../data/ccip/events/v1_6_0/pool-receive.json | 54 +++++++++ .../data/ccip/events/v1_6_0/pool-send.json | 49 ++++++++ .../ccip/events/v1_6_0/router-receive.json | 28 +++++ src/config/data/ccip/events/v1_6_1/index.ts | 5 + .../ccip/events/v1_6_1/offramp-receive.json | 43 +++++++ .../data/ccip/events/v1_6_1/onramp-send.json | 23 ++++ .../data/ccip/events/v1_6_1/pool-receive.json | 54 +++++++++ .../data/ccip/events/v1_6_1/pool-send.json | 49 ++++++++ .../ccip/events/v1_6_1/router-receive.json | 28 +++++ src/config/data/ccip/events/v1_6_2/index.ts | 5 + .../ccip/events/v1_6_2/offramp-receive.json | 43 +++++++ .../data/ccip/events/v1_6_2/onramp-send.json | 23 ++++ .../data/ccip/events/v1_6_2/pool-receive.json | 54 +++++++++ .../data/ccip/events/v1_6_2/pool-send.json | 49 ++++++++ .../ccip/events/v1_6_2/router-receive.json | 28 +++++ src/config/data/ccip/events/v1_6_3/index.ts | 5 + .../ccip/events/v1_6_3/offramp-receive.json | 43 +++++++ .../data/ccip/events/v1_6_3/onramp-send.json | 23 ++++ .../data/ccip/events/v1_6_3/pool-receive.json | 54 +++++++++ .../data/ccip/events/v1_6_3/pool-send.json | 49 ++++++++ .../ccip/events/v1_6_3/router-receive.json | 28 +++++ src/config/data/ccip/types.ts | 10 ++ .../__snapshots__/ccip-dynamic.test.ts.snap | 24 ++++ .../ccip/api-reference/evm/v1_5_0.json | 4 + .../ccip/api-reference/evm/v1_5_1.json | 4 + .../ccip/api-reference/evm/v1_6_0.json | 4 + .../ccip/api-reference/evm/v1_6_1.json | 4 + .../ccip/api-reference/evm/v1_6_2.json | 4 + .../ccip/api-reference/evm/v1_6_3.json | 4 + .../ccip/api-reference/evm/v1.5.0/events.mdx | 35 ++++++ .../ccip/api-reference/evm/v1.5.1/events.mdx | 43 +++++++ .../ccip/api-reference/evm/v1.6.0/events.mdx | 43 +++++++ .../ccip/api-reference/evm/v1.6.1/events.mdx | 43 +++++++ .../ccip/api-reference/evm/v1.6.2/events.mdx | 43 +++++++ .../ccip/api-reference/evm/v1.6.3/events.mdx | 43 +++++++ .../components/api-reference/Events.astro | 106 ++++++++++++++++++ .../ccip/components/api-reference/index.ts | 1 + 53 files changed, 1688 insertions(+) create mode 100644 src/config/data/ccip/events/v1_5_0/index.ts create mode 100644 src/config/data/ccip/events/v1_5_0/offramp-receive.json create mode 100644 src/config/data/ccip/events/v1_5_0/onramp-send.json create mode 100644 src/config/data/ccip/events/v1_5_0/pool-receive.json create mode 100644 src/config/data/ccip/events/v1_5_0/pool-send.json create mode 100644 src/config/data/ccip/events/v1_5_0/router-receive.json create mode 100644 src/config/data/ccip/events/v1_5_1/index.ts create mode 100644 src/config/data/ccip/events/v1_5_1/offramp-receive.json create mode 100644 src/config/data/ccip/events/v1_5_1/onramp-send.json create mode 100644 src/config/data/ccip/events/v1_5_1/pool-receive.json create mode 100644 src/config/data/ccip/events/v1_5_1/pool-send.json create mode 100644 src/config/data/ccip/events/v1_5_1/router-receive.json create mode 100644 src/config/data/ccip/events/v1_6_0/index.ts create mode 100644 src/config/data/ccip/events/v1_6_0/offramp-receive.json create mode 100644 src/config/data/ccip/events/v1_6_0/onramp-send.json create mode 100644 src/config/data/ccip/events/v1_6_0/pool-receive.json create mode 100644 src/config/data/ccip/events/v1_6_0/pool-send.json create mode 100644 src/config/data/ccip/events/v1_6_0/router-receive.json create mode 100644 src/config/data/ccip/events/v1_6_1/index.ts create mode 100644 src/config/data/ccip/events/v1_6_1/offramp-receive.json create mode 100644 src/config/data/ccip/events/v1_6_1/onramp-send.json create mode 100644 src/config/data/ccip/events/v1_6_1/pool-receive.json create mode 100644 src/config/data/ccip/events/v1_6_1/pool-send.json create mode 100644 src/config/data/ccip/events/v1_6_1/router-receive.json create mode 100644 src/config/data/ccip/events/v1_6_2/index.ts create mode 100644 src/config/data/ccip/events/v1_6_2/offramp-receive.json create mode 100644 src/config/data/ccip/events/v1_6_2/onramp-send.json create mode 100644 src/config/data/ccip/events/v1_6_2/pool-receive.json create mode 100644 src/config/data/ccip/events/v1_6_2/pool-send.json create mode 100644 src/config/data/ccip/events/v1_6_2/router-receive.json create mode 100644 src/config/data/ccip/events/v1_6_3/index.ts create mode 100644 src/config/data/ccip/events/v1_6_3/offramp-receive.json create mode 100644 src/config/data/ccip/events/v1_6_3/onramp-send.json create mode 100644 src/config/data/ccip/events/v1_6_3/pool-receive.json create mode 100644 src/config/data/ccip/events/v1_6_3/pool-send.json create mode 100644 src/config/data/ccip/events/v1_6_3/router-receive.json create mode 100644 src/content/ccip/api-reference/evm/v1.5.0/events.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.5.1/events.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.0/events.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.1/events.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.2/events.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.3/events.mdx create mode 100644 src/features/ccip/components/api-reference/Events.astro diff --git a/src/config/data/ccip/data.ts b/src/config/data/ccip/data.ts index 5fe01ccd46c..f5f96ebe9f6 100644 --- a/src/config/data/ccip/data.ts +++ b/src/config/data/ccip/data.ts @@ -5,6 +5,7 @@ import { Environment, Version, CCIPSendErrorEntry, + CCIPEventEntry, SupportedTokenConfig, TokenMechanism, NetworkFees, @@ -54,6 +55,18 @@ import * as errors_v1_6_1 from "./errors/v1_6_1/index.ts" import * as errors_v1_6_2 from "./errors/v1_6_2/index.ts" // eslint-disable-next-line camelcase import * as errors_v1_6_3 from "./errors/v1_6_3/index.ts" +// eslint-disable-next-line camelcase +import * as events_v1_5_0 from "./events/v1_5_0/index.ts" +// eslint-disable-next-line camelcase +import * as events_v1_5_1 from "./events/v1_5_1/index.ts" +// eslint-disable-next-line camelcase +import * as events_v1_6_0 from "./events/v1_6_0/index.ts" +// eslint-disable-next-line camelcase +import * as events_v1_6_1 from "./events/v1_6_1/index.ts" +// eslint-disable-next-line camelcase +import * as events_v1_6_2 from "./events/v1_6_2/index.ts" +// eslint-disable-next-line camelcase +import * as events_v1_6_3 from "./events/v1_6_3/index.ts" export const getAllEnvironments = () => [Environment.Mainnet, Environment.Testnet] export const getAllVersions = () => [Version.V1_2_0] @@ -106,6 +119,56 @@ export const errors: VersionedErrors = { v1_6_3: errors_v1_6_3 as ErrorTypesV163, } +// Type for v1.5.0 events +type EventTypesV150 = { + onrampCCIPSendEvents: CCIPEventEntry[] + offrampCCIPReceiveEvents: CCIPEventEntry[] + routerCCIPReceiveEvents: CCIPEventEntry[] +} + +// Type for v1.5.1 events +type EventTypesV151 = EventTypesV150 & { + poolCCIPSendEvents: CCIPEventEntry[] + poolCCIPReceiveEvents: CCIPEventEntry[] +} + +// Type for v1.6.0 events +type EventTypesV160 = EventTypesV151 + +// Type for v1.6.1 events +type EventTypesV161 = EventTypesV160 + +// Type for v1.6.2 events +type EventTypesV162 = EventTypesV161 + +// Type for v1.6.3 events +type EventTypesV163 = EventTypesV162 + +type VersionedEvents = { + v1_5_0: EventTypesV150 + v1_5_1: EventTypesV151 + v1_6_0: EventTypesV160 + v1_6_1: EventTypesV161 + v1_6_2: EventTypesV162 + v1_6_3: EventTypesV163 +} + +// Export events by version with type safety +export const events: VersionedEvents = { + // eslint-disable-next-line camelcase + v1_5_0: events_v1_5_0 as EventTypesV150, + // eslint-disable-next-line camelcase + v1_5_1: events_v1_5_1 as EventTypesV151, + // eslint-disable-next-line camelcase + v1_6_0: events_v1_6_0 as EventTypesV160, + // eslint-disable-next-line camelcase + v1_6_1: events_v1_6_1 as EventTypesV161, + // eslint-disable-next-line camelcase + v1_6_2: events_v1_6_2 as EventTypesV162, + // eslint-disable-next-line camelcase + v1_6_3: events_v1_6_3 as EventTypesV163, +} + export const networkFees: NetworkFees = { tokenTransfers: { [TokenMechanism.LockAndUnlock]: { diff --git a/src/config/data/ccip/events/v1_5_0/index.ts b/src/config/data/ccip/events/v1_5_0/index.ts new file mode 100644 index 00000000000..7b692cd336f --- /dev/null +++ b/src/config/data/ccip/events/v1_5_0/index.ts @@ -0,0 +1,3 @@ +export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" +export { default as routerCCIPReceiveEvents } from "./router-receive.json" diff --git a/src/config/data/ccip/events/v1_5_0/offramp-receive.json b/src/config/data/ccip/events/v1_5_0/offramp-receive.json new file mode 100644 index 00000000000..a6dd940926c --- /dev/null +++ b/src/config/data/ccip/events/v1_5_0/offramp-receive.json @@ -0,0 +1,43 @@ +[ + { + "event": "ExecutionStateChanged", + "parameters": [ + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageId", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageHash", + "indexed": false + }, + { + "type": "Internal.MessageExecutionState", + "name": "state", + "indexed": false + }, + { + "type": "bytes", + "name": "returnData", + "indexed": false + }, + { + "type": "uint256", + "name": "gasUsed", + "indexed": false + } + ], + "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." + } +] diff --git a/src/config/data/ccip/events/v1_5_0/onramp-send.json b/src/config/data/ccip/events/v1_5_0/onramp-send.json new file mode 100644 index 00000000000..477f53296da --- /dev/null +++ b/src/config/data/ccip/events/v1_5_0/onramp-send.json @@ -0,0 +1,23 @@ +[ + { + "event": "CCIPMessageSent", + "parameters": [ + { + "type": "uint64", + "name": "destChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "Internal.EVM2AnyRampMessage", + "name": "message", + "indexed": false + } + ], + "description": "Emitted when a CCIP message is successfully sent." + } +] diff --git a/src/config/data/ccip/events/v1_5_0/pool-receive.json b/src/config/data/ccip/events/v1_5_0/pool-receive.json new file mode 100644 index 00000000000..b09a78a5f32 --- /dev/null +++ b/src/config/data/ccip/events/v1_5_0/pool-receive.json @@ -0,0 +1,54 @@ +[ + { + "event": "ReleasedOrMinted", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "address", + "name": "recipient", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + }, + { + "event": "InboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_5_0/pool-send.json b/src/config/data/ccip/events/v1_5_0/pool-send.json new file mode 100644 index 00000000000..016203e1b0d --- /dev/null +++ b/src/config/data/ccip/events/v1_5_0/pool-send.json @@ -0,0 +1,49 @@ +[ + { + "event": "LockedOrBurned", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + }, + { + "event": "OutboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_5_0/router-receive.json b/src/config/data/ccip/events/v1_5_0/router-receive.json new file mode 100644 index 00000000000..4a008df8064 --- /dev/null +++ b/src/config/data/ccip/events/v1_5_0/router-receive.json @@ -0,0 +1,28 @@ +[ + { + "event": "MessageExecuted", + "parameters": [ + { + "type": "bytes32", + "name": "messageId", + "indexed": false + }, + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": false + }, + { + "type": "address", + "name": "offRamp", + "indexed": false + }, + { + "type": "bytes32", + "name": "calldataHash", + "indexed": false + } + ], + "description": "Emitted when the Router successfully routes a message to the receiver." + } +] diff --git a/src/config/data/ccip/events/v1_5_1/index.ts b/src/config/data/ccip/events/v1_5_1/index.ts new file mode 100644 index 00000000000..ee6ddd41296 --- /dev/null +++ b/src/config/data/ccip/events/v1_5_1/index.ts @@ -0,0 +1,5 @@ +export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as poolCCIPSendEvents } from "./pool-send.json" +export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" +export { default as routerCCIPReceiveEvents } from "./router-receive.json" +export { default as poolCCIPReceiveEvents } from "./pool-receive.json" diff --git a/src/config/data/ccip/events/v1_5_1/offramp-receive.json b/src/config/data/ccip/events/v1_5_1/offramp-receive.json new file mode 100644 index 00000000000..a6dd940926c --- /dev/null +++ b/src/config/data/ccip/events/v1_5_1/offramp-receive.json @@ -0,0 +1,43 @@ +[ + { + "event": "ExecutionStateChanged", + "parameters": [ + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageId", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageHash", + "indexed": false + }, + { + "type": "Internal.MessageExecutionState", + "name": "state", + "indexed": false + }, + { + "type": "bytes", + "name": "returnData", + "indexed": false + }, + { + "type": "uint256", + "name": "gasUsed", + "indexed": false + } + ], + "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." + } +] diff --git a/src/config/data/ccip/events/v1_5_1/onramp-send.json b/src/config/data/ccip/events/v1_5_1/onramp-send.json new file mode 100644 index 00000000000..477f53296da --- /dev/null +++ b/src/config/data/ccip/events/v1_5_1/onramp-send.json @@ -0,0 +1,23 @@ +[ + { + "event": "CCIPMessageSent", + "parameters": [ + { + "type": "uint64", + "name": "destChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "Internal.EVM2AnyRampMessage", + "name": "message", + "indexed": false + } + ], + "description": "Emitted when a CCIP message is successfully sent." + } +] diff --git a/src/config/data/ccip/events/v1_5_1/pool-receive.json b/src/config/data/ccip/events/v1_5_1/pool-receive.json new file mode 100644 index 00000000000..b09a78a5f32 --- /dev/null +++ b/src/config/data/ccip/events/v1_5_1/pool-receive.json @@ -0,0 +1,54 @@ +[ + { + "event": "ReleasedOrMinted", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "address", + "name": "recipient", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + }, + { + "event": "InboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_5_1/pool-send.json b/src/config/data/ccip/events/v1_5_1/pool-send.json new file mode 100644 index 00000000000..016203e1b0d --- /dev/null +++ b/src/config/data/ccip/events/v1_5_1/pool-send.json @@ -0,0 +1,49 @@ +[ + { + "event": "LockedOrBurned", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + }, + { + "event": "OutboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_5_1/router-receive.json b/src/config/data/ccip/events/v1_5_1/router-receive.json new file mode 100644 index 00000000000..4a008df8064 --- /dev/null +++ b/src/config/data/ccip/events/v1_5_1/router-receive.json @@ -0,0 +1,28 @@ +[ + { + "event": "MessageExecuted", + "parameters": [ + { + "type": "bytes32", + "name": "messageId", + "indexed": false + }, + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": false + }, + { + "type": "address", + "name": "offRamp", + "indexed": false + }, + { + "type": "bytes32", + "name": "calldataHash", + "indexed": false + } + ], + "description": "Emitted when the Router successfully routes a message to the receiver." + } +] diff --git a/src/config/data/ccip/events/v1_6_0/index.ts b/src/config/data/ccip/events/v1_6_0/index.ts new file mode 100644 index 00000000000..ee6ddd41296 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_0/index.ts @@ -0,0 +1,5 @@ +export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as poolCCIPSendEvents } from "./pool-send.json" +export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" +export { default as routerCCIPReceiveEvents } from "./router-receive.json" +export { default as poolCCIPReceiveEvents } from "./pool-receive.json" diff --git a/src/config/data/ccip/events/v1_6_0/offramp-receive.json b/src/config/data/ccip/events/v1_6_0/offramp-receive.json new file mode 100644 index 00000000000..a6dd940926c --- /dev/null +++ b/src/config/data/ccip/events/v1_6_0/offramp-receive.json @@ -0,0 +1,43 @@ +[ + { + "event": "ExecutionStateChanged", + "parameters": [ + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageId", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageHash", + "indexed": false + }, + { + "type": "Internal.MessageExecutionState", + "name": "state", + "indexed": false + }, + { + "type": "bytes", + "name": "returnData", + "indexed": false + }, + { + "type": "uint256", + "name": "gasUsed", + "indexed": false + } + ], + "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." + } +] diff --git a/src/config/data/ccip/events/v1_6_0/onramp-send.json b/src/config/data/ccip/events/v1_6_0/onramp-send.json new file mode 100644 index 00000000000..477f53296da --- /dev/null +++ b/src/config/data/ccip/events/v1_6_0/onramp-send.json @@ -0,0 +1,23 @@ +[ + { + "event": "CCIPMessageSent", + "parameters": [ + { + "type": "uint64", + "name": "destChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "Internal.EVM2AnyRampMessage", + "name": "message", + "indexed": false + } + ], + "description": "Emitted when a CCIP message is successfully sent." + } +] diff --git a/src/config/data/ccip/events/v1_6_0/pool-receive.json b/src/config/data/ccip/events/v1_6_0/pool-receive.json new file mode 100644 index 00000000000..b09a78a5f32 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_0/pool-receive.json @@ -0,0 +1,54 @@ +[ + { + "event": "ReleasedOrMinted", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "address", + "name": "recipient", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + }, + { + "event": "InboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_0/pool-send.json b/src/config/data/ccip/events/v1_6_0/pool-send.json new file mode 100644 index 00000000000..016203e1b0d --- /dev/null +++ b/src/config/data/ccip/events/v1_6_0/pool-send.json @@ -0,0 +1,49 @@ +[ + { + "event": "LockedOrBurned", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + }, + { + "event": "OutboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_0/router-receive.json b/src/config/data/ccip/events/v1_6_0/router-receive.json new file mode 100644 index 00000000000..4a008df8064 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_0/router-receive.json @@ -0,0 +1,28 @@ +[ + { + "event": "MessageExecuted", + "parameters": [ + { + "type": "bytes32", + "name": "messageId", + "indexed": false + }, + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": false + }, + { + "type": "address", + "name": "offRamp", + "indexed": false + }, + { + "type": "bytes32", + "name": "calldataHash", + "indexed": false + } + ], + "description": "Emitted when the Router successfully routes a message to the receiver." + } +] diff --git a/src/config/data/ccip/events/v1_6_1/index.ts b/src/config/data/ccip/events/v1_6_1/index.ts new file mode 100644 index 00000000000..ee6ddd41296 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_1/index.ts @@ -0,0 +1,5 @@ +export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as poolCCIPSendEvents } from "./pool-send.json" +export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" +export { default as routerCCIPReceiveEvents } from "./router-receive.json" +export { default as poolCCIPReceiveEvents } from "./pool-receive.json" diff --git a/src/config/data/ccip/events/v1_6_1/offramp-receive.json b/src/config/data/ccip/events/v1_6_1/offramp-receive.json new file mode 100644 index 00000000000..a6dd940926c --- /dev/null +++ b/src/config/data/ccip/events/v1_6_1/offramp-receive.json @@ -0,0 +1,43 @@ +[ + { + "event": "ExecutionStateChanged", + "parameters": [ + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageId", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageHash", + "indexed": false + }, + { + "type": "Internal.MessageExecutionState", + "name": "state", + "indexed": false + }, + { + "type": "bytes", + "name": "returnData", + "indexed": false + }, + { + "type": "uint256", + "name": "gasUsed", + "indexed": false + } + ], + "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." + } +] diff --git a/src/config/data/ccip/events/v1_6_1/onramp-send.json b/src/config/data/ccip/events/v1_6_1/onramp-send.json new file mode 100644 index 00000000000..477f53296da --- /dev/null +++ b/src/config/data/ccip/events/v1_6_1/onramp-send.json @@ -0,0 +1,23 @@ +[ + { + "event": "CCIPMessageSent", + "parameters": [ + { + "type": "uint64", + "name": "destChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "Internal.EVM2AnyRampMessage", + "name": "message", + "indexed": false + } + ], + "description": "Emitted when a CCIP message is successfully sent." + } +] diff --git a/src/config/data/ccip/events/v1_6_1/pool-receive.json b/src/config/data/ccip/events/v1_6_1/pool-receive.json new file mode 100644 index 00000000000..b09a78a5f32 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_1/pool-receive.json @@ -0,0 +1,54 @@ +[ + { + "event": "ReleasedOrMinted", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "address", + "name": "recipient", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + }, + { + "event": "InboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_1/pool-send.json b/src/config/data/ccip/events/v1_6_1/pool-send.json new file mode 100644 index 00000000000..016203e1b0d --- /dev/null +++ b/src/config/data/ccip/events/v1_6_1/pool-send.json @@ -0,0 +1,49 @@ +[ + { + "event": "LockedOrBurned", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + }, + { + "event": "OutboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_1/router-receive.json b/src/config/data/ccip/events/v1_6_1/router-receive.json new file mode 100644 index 00000000000..4a008df8064 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_1/router-receive.json @@ -0,0 +1,28 @@ +[ + { + "event": "MessageExecuted", + "parameters": [ + { + "type": "bytes32", + "name": "messageId", + "indexed": false + }, + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": false + }, + { + "type": "address", + "name": "offRamp", + "indexed": false + }, + { + "type": "bytes32", + "name": "calldataHash", + "indexed": false + } + ], + "description": "Emitted when the Router successfully routes a message to the receiver." + } +] diff --git a/src/config/data/ccip/events/v1_6_2/index.ts b/src/config/data/ccip/events/v1_6_2/index.ts new file mode 100644 index 00000000000..ee6ddd41296 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_2/index.ts @@ -0,0 +1,5 @@ +export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as poolCCIPSendEvents } from "./pool-send.json" +export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" +export { default as routerCCIPReceiveEvents } from "./router-receive.json" +export { default as poolCCIPReceiveEvents } from "./pool-receive.json" diff --git a/src/config/data/ccip/events/v1_6_2/offramp-receive.json b/src/config/data/ccip/events/v1_6_2/offramp-receive.json new file mode 100644 index 00000000000..a6dd940926c --- /dev/null +++ b/src/config/data/ccip/events/v1_6_2/offramp-receive.json @@ -0,0 +1,43 @@ +[ + { + "event": "ExecutionStateChanged", + "parameters": [ + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageId", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageHash", + "indexed": false + }, + { + "type": "Internal.MessageExecutionState", + "name": "state", + "indexed": false + }, + { + "type": "bytes", + "name": "returnData", + "indexed": false + }, + { + "type": "uint256", + "name": "gasUsed", + "indexed": false + } + ], + "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." + } +] diff --git a/src/config/data/ccip/events/v1_6_2/onramp-send.json b/src/config/data/ccip/events/v1_6_2/onramp-send.json new file mode 100644 index 00000000000..477f53296da --- /dev/null +++ b/src/config/data/ccip/events/v1_6_2/onramp-send.json @@ -0,0 +1,23 @@ +[ + { + "event": "CCIPMessageSent", + "parameters": [ + { + "type": "uint64", + "name": "destChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "Internal.EVM2AnyRampMessage", + "name": "message", + "indexed": false + } + ], + "description": "Emitted when a CCIP message is successfully sent." + } +] diff --git a/src/config/data/ccip/events/v1_6_2/pool-receive.json b/src/config/data/ccip/events/v1_6_2/pool-receive.json new file mode 100644 index 00000000000..b09a78a5f32 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_2/pool-receive.json @@ -0,0 +1,54 @@ +[ + { + "event": "ReleasedOrMinted", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "address", + "name": "recipient", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + }, + { + "event": "InboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_2/pool-send.json b/src/config/data/ccip/events/v1_6_2/pool-send.json new file mode 100644 index 00000000000..016203e1b0d --- /dev/null +++ b/src/config/data/ccip/events/v1_6_2/pool-send.json @@ -0,0 +1,49 @@ +[ + { + "event": "LockedOrBurned", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + }, + { + "event": "OutboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_2/router-receive.json b/src/config/data/ccip/events/v1_6_2/router-receive.json new file mode 100644 index 00000000000..4a008df8064 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_2/router-receive.json @@ -0,0 +1,28 @@ +[ + { + "event": "MessageExecuted", + "parameters": [ + { + "type": "bytes32", + "name": "messageId", + "indexed": false + }, + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": false + }, + { + "type": "address", + "name": "offRamp", + "indexed": false + }, + { + "type": "bytes32", + "name": "calldataHash", + "indexed": false + } + ], + "description": "Emitted when the Router successfully routes a message to the receiver." + } +] diff --git a/src/config/data/ccip/events/v1_6_3/index.ts b/src/config/data/ccip/events/v1_6_3/index.ts new file mode 100644 index 00000000000..ee6ddd41296 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_3/index.ts @@ -0,0 +1,5 @@ +export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as poolCCIPSendEvents } from "./pool-send.json" +export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" +export { default as routerCCIPReceiveEvents } from "./router-receive.json" +export { default as poolCCIPReceiveEvents } from "./pool-receive.json" diff --git a/src/config/data/ccip/events/v1_6_3/offramp-receive.json b/src/config/data/ccip/events/v1_6_3/offramp-receive.json new file mode 100644 index 00000000000..a6dd940926c --- /dev/null +++ b/src/config/data/ccip/events/v1_6_3/offramp-receive.json @@ -0,0 +1,43 @@ +[ + { + "event": "ExecutionStateChanged", + "parameters": [ + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageId", + "indexed": true + }, + { + "type": "bytes32", + "name": "messageHash", + "indexed": false + }, + { + "type": "Internal.MessageExecutionState", + "name": "state", + "indexed": false + }, + { + "type": "bytes", + "name": "returnData", + "indexed": false + }, + { + "type": "uint256", + "name": "gasUsed", + "indexed": false + } + ], + "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." + } +] diff --git a/src/config/data/ccip/events/v1_6_3/onramp-send.json b/src/config/data/ccip/events/v1_6_3/onramp-send.json new file mode 100644 index 00000000000..477f53296da --- /dev/null +++ b/src/config/data/ccip/events/v1_6_3/onramp-send.json @@ -0,0 +1,23 @@ +[ + { + "event": "CCIPMessageSent", + "parameters": [ + { + "type": "uint64", + "name": "destChainSelector", + "indexed": true + }, + { + "type": "uint64", + "name": "sequenceNumber", + "indexed": true + }, + { + "type": "Internal.EVM2AnyRampMessage", + "name": "message", + "indexed": false + } + ], + "description": "Emitted when a CCIP message is successfully sent." + } +] diff --git a/src/config/data/ccip/events/v1_6_3/pool-receive.json b/src/config/data/ccip/events/v1_6_3/pool-receive.json new file mode 100644 index 00000000000..b09a78a5f32 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_3/pool-receive.json @@ -0,0 +1,54 @@ +[ + { + "event": "ReleasedOrMinted", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "address", + "name": "recipient", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + }, + { + "event": "InboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_3/pool-send.json b/src/config/data/ccip/events/v1_6_3/pool-send.json new file mode 100644 index 00000000000..016203e1b0d --- /dev/null +++ b/src/config/data/ccip/events/v1_6_3/pool-send.json @@ -0,0 +1,49 @@ +[ + { + "event": "LockedOrBurned", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "address", + "name": "sender", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + }, + { + "event": "OutboundRateLimitConsumed", + "parameters": [ + { + "type": "uint64", + "name": "remoteChainSelector", + "indexed": true + }, + { + "type": "address", + "name": "token", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "indexed": false + } + ], + "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + } +] diff --git a/src/config/data/ccip/events/v1_6_3/router-receive.json b/src/config/data/ccip/events/v1_6_3/router-receive.json new file mode 100644 index 00000000000..4a008df8064 --- /dev/null +++ b/src/config/data/ccip/events/v1_6_3/router-receive.json @@ -0,0 +1,28 @@ +[ + { + "event": "MessageExecuted", + "parameters": [ + { + "type": "bytes32", + "name": "messageId", + "indexed": false + }, + { + "type": "uint64", + "name": "sourceChainSelector", + "indexed": false + }, + { + "type": "address", + "name": "offRamp", + "indexed": false + }, + { + "type": "bytes32", + "name": "calldataHash", + "indexed": false + } + ], + "description": "Emitted when the Router successfully routes a message to the receiver." + } +] diff --git a/src/config/data/ccip/types.ts b/src/config/data/ccip/types.ts index 516da91586a..05c6286b876 100644 --- a/src/config/data/ccip/types.ts +++ b/src/config/data/ccip/types.ts @@ -163,6 +163,16 @@ export interface CCIPSendErrorEntry { description: string } +export interface CCIPEventEntry { + event: string + parameters?: Array<{ + type: string + name: string + indexed: boolean + }> + description: string +} + export enum LaneStatus { OPERATIONAL = "OPERATIONAL", MAINTENANCE = "MAINTENANCE", diff --git a/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap b/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap index d7201089f4d..72fac3e2e37 100644 --- a/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap +++ b/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap @@ -832,6 +832,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Errors", "url": "ccip/api-reference/evm/v1.6.3/errors", }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.3/events", + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.3/ownable-2-step", @@ -907,6 +911,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Errors", "url": "ccip/api-reference/evm/v1.6.2/errors", }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.2/events", + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.2/ownable-2-step", @@ -985,6 +993,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Errors", "url": "ccip/api-reference/evm/v1.6.1/errors", }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.1/events", + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.1/ownable-2-step", @@ -1063,6 +1075,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Errors", "url": "ccip/api-reference/evm/v1.6.0/errors", }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.0/events", + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.0/ownable-2-step", @@ -1141,6 +1157,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Errors", "url": "ccip/api-reference/evm/v1.5.1/errors", }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.5.1/events", + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.5.1/ownable-2-step", @@ -1211,6 +1231,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Errors", "url": "ccip/api-reference/evm/v1.5.0/errors", }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.5.0/events", + }, ], "isCollapsible": true, "title": "v1.5.0", diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json b/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json index a6e78602d94..06d0efee1e3 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json @@ -50,5 +50,9 @@ { "title": "Errors", "url": "ccip/api-reference/evm/v1.5.0/errors" + }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.5.0/events" } ] diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json b/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json index 3eda58d5ddb..fe1fb7a4185 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json @@ -59,6 +59,10 @@ "title": "Errors", "url": "ccip/api-reference/evm/v1.5.1/errors" }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.5.1/events" + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.5.1/ownable-2-step" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json index fc2ecd2c85f..934f9e94a85 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json @@ -59,6 +59,10 @@ "title": "Errors", "url": "ccip/api-reference/evm/v1.6.0/errors" }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.0/events" + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.0/ownable-2-step" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json index f90c35cffdf..f3afb826dd3 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json @@ -59,6 +59,10 @@ "title": "Errors", "url": "ccip/api-reference/evm/v1.6.1/errors" }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.1/events" + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.1/ownable-2-step" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json index 1dade4a99cc..37f5528a33d 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json @@ -59,6 +59,10 @@ "title": "Errors", "url": "ccip/api-reference/evm/v1.6.2/errors" }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.2/events" + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.2/ownable-2-step" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json index 11b64c236cf..fc14bddde6f 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json @@ -59,6 +59,10 @@ "title": "Errors", "url": "ccip/api-reference/evm/v1.6.3/errors" }, + { + "title": "Events", + "url": "ccip/api-reference/evm/v1.6.3/events" + }, { "title": "Ownable2Step", "url": "ccip/api-reference/evm/v1.6.3/ownable-2-step" diff --git a/src/content/ccip/api-reference/evm/v1.5.0/events.mdx b/src/content/ccip/api-reference/evm/v1.5.0/events.mdx new file mode 100644 index 00000000000..6dda60c53a7 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.5.0/events.mdx @@ -0,0 +1,35 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.5.0 Events API Reference" +metadata: + description: "API documentation for events emitted during Chainlink CCIP v1.5.0 operations, including ccipSend and ccipReceive events from router, onramp, and offramp contracts." +--- + +import CcipCommon from "@features/ccip/CcipCommon.astro" +import { CCIPEvent } from "@features/ccip/components/api-reference" +import { Aside, CopyText } from "@components" + + + +When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.5.0/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. + +## ccipSend Events + +These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.5.0/i-router-client#ccipsend). + +### OnRamp Events + + + +## ccipReceive Events + +These events are emitted when a cross-chain message is executed on the destination chain. + +### OffRamp Events + + + +### Router Events + + diff --git a/src/content/ccip/api-reference/evm/v1.5.1/events.mdx b/src/content/ccip/api-reference/evm/v1.5.1/events.mdx new file mode 100644 index 00000000000..d02c2e5d72f --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.5.1/events.mdx @@ -0,0 +1,43 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.5.1 Events API Reference" +metadata: + description: "API documentation for events emitted during Chainlink CCIP v1.5.1 operations, including ccipSend and ccipReceive events from router, onramp, offramp, and token pool contracts." +--- + +import CcipCommon from "@features/ccip/CcipCommon.astro" +import { CCIPEvent } from "@features/ccip/components/api-reference" +import { Aside, CopyText } from "@components" + + + +When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.5.1/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. + +## ccipSend Events + +These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.5.1/i-router-client#ccipsend). + +### OnRamp Events + + + +### Token Pool Events (Send) + + + +## ccipReceive Events + +These events are emitted when a cross-chain message is executed on the destination chain. + +### OffRamp Events + + + +### Router Events + + + +### Token Pool Events (Receive) + + diff --git a/src/content/ccip/api-reference/evm/v1.6.0/events.mdx b/src/content/ccip/api-reference/evm/v1.6.0/events.mdx new file mode 100644 index 00000000000..7945752cb3b --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.0/events.mdx @@ -0,0 +1,43 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.0 Events API Reference" +metadata: + description: "API documentation for events emitted during Chainlink CCIP v1.6.0 operations, including ccipSend and ccipReceive events from router, onramp, offramp, and token pool contracts." +--- + +import CcipCommon from "@features/ccip/CcipCommon.astro" +import { CCIPEvent } from "@features/ccip/components/api-reference" +import { Aside, CopyText } from "@components" + + + +When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.0/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. + +## ccipSend Events + +These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.0/i-router-client#ccipsend). + +### OnRamp Events + + + +### Token Pool Events (Send) + + + +## ccipReceive Events + +These events are emitted when a cross-chain message is executed on the destination chain. + +### OffRamp Events + + + +### Router Events + + + +### Token Pool Events (Receive) + + diff --git a/src/content/ccip/api-reference/evm/v1.6.1/events.mdx b/src/content/ccip/api-reference/evm/v1.6.1/events.mdx new file mode 100644 index 00000000000..e9343292203 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.1/events.mdx @@ -0,0 +1,43 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.1 Events API Reference" +metadata: + description: "API documentation for events emitted during Chainlink CCIP v1.6.1 operations, including ccipSend and ccipReceive events from router, onramp, offramp, and token pool contracts." +--- + +import CcipCommon from "@features/ccip/CcipCommon.astro" +import { CCIPEvent } from "@features/ccip/components/api-reference" +import { Aside, CopyText } from "@components" + + + +When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.1/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. + +## ccipSend Events + +These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.1/i-router-client#ccipsend). + +### OnRamp Events + + + +### Token Pool Events (Send) + + + +## ccipReceive Events + +These events are emitted when a cross-chain message is executed on the destination chain. + +### OffRamp Events + + + +### Router Events + + + +### Token Pool Events (Receive) + + diff --git a/src/content/ccip/api-reference/evm/v1.6.2/events.mdx b/src/content/ccip/api-reference/evm/v1.6.2/events.mdx new file mode 100644 index 00000000000..0d5a0aa00a1 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.2/events.mdx @@ -0,0 +1,43 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.2 Events API Reference" +metadata: + description: "API documentation for events emitted during Chainlink CCIP v1.6.2 operations, including ccipSend and ccipReceive events from router, onramp, offramp, and token pool contracts." +--- + +import CcipCommon from "@features/ccip/CcipCommon.astro" +import { CCIPEvent } from "@features/ccip/components/api-reference" +import { Aside, CopyText } from "@components" + + + +When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.2/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. + +## ccipSend Events + +These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.2/i-router-client#ccipsend). + +### OnRamp Events + + + +### Token Pool Events (Send) + + + +## ccipReceive Events + +These events are emitted when a cross-chain message is executed on the destination chain. + +### OffRamp Events + + + +### Router Events + + + +### Token Pool Events (Receive) + + diff --git a/src/content/ccip/api-reference/evm/v1.6.3/events.mdx b/src/content/ccip/api-reference/evm/v1.6.3/events.mdx new file mode 100644 index 00000000000..c69384cb812 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.3/events.mdx @@ -0,0 +1,43 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.3 Events API Reference" +metadata: + description: "API documentation for events emitted during Chainlink CCIP v1.6.3 operations, including ccipSend and ccipReceive events from router, onramp, offramp, and token pool contracts." +--- + +import CcipCommon from "@features/ccip/CcipCommon.astro" +import { CCIPEvent } from "@features/ccip/components/api-reference" +import { Aside, CopyText } from "@components" + + + +When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.3/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. + +## ccipSend Events + +These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.3/i-router-client#ccipsend). + +### OnRamp Events + + + +### Token Pool Events (Send) + + + +## ccipReceive Events + +These events are emitted when a cross-chain message is executed on the destination chain. + +### OffRamp Events + + + +### Router Events + + + +### Token Pool Events (Receive) + + diff --git a/src/features/ccip/components/api-reference/Events.astro b/src/features/ccip/components/api-reference/Events.astro new file mode 100644 index 00000000000..3265fb66f31 --- /dev/null +++ b/src/features/ccip/components/api-reference/Events.astro @@ -0,0 +1,106 @@ +--- +import type { CCIPEventEntry } from "@config/data/ccip/types" +import { events } from "@config/data/ccip/data" +import { CopyText } from "@components" +import { marked } from "marked" + +// Define event parameter type +interface EventParameter { + type: string + name: string + indexed?: boolean +} + +// Props with literal types - use the same keys as in data.ts +interface Props { + type: "onramp-send" | "pool-send" | "offramp-receive" | "router-receive" | "pool-receive" + version: "v1_5_0" | "v1_5_1" | "v1_6_0" | "v1_6_1" | "v1_6_2" | "v1_6_3" +} + +const { type, version } = Astro.props + +// Simple mapping to event keys +const typeToEventKey = { + "onramp-send": "onrampCCIPSendEvents", + "pool-send": "poolCCIPSendEvents", + "offramp-receive": "offrampCCIPReceiveEvents", + "router-receive": "routerCCIPReceiveEvents", + "pool-receive": "poolCCIPReceiveEvents", +} as const + +const selectedEvents = events[version]?.[typeToEventKey[type]] || [] + +if (!selectedEvents.length) { + throw new Error(`Invalid event type: ${type} or version: ${version}`) +} + +// Check if any event has parameters or event signature +const hasParameters = selectedEvents.some( + (event: CCIPEventEntry) => Array.isArray(event.parameters) && event.parameters.length > 0 +) + +// Fix for marked.parse return type +const renderMarkdown = (text: string): string => { + const result = marked.parse(text) + // Handle potential Promise return + return typeof result === "string" ? result : "" +} +--- + +
+ + + + + {hasParameters && } + + + + + { + selectedEvents.map((event: CCIPEventEntry) => ( + + + {hasParameters && ( + + )} + + )) + } + +
EventParametersDescription
{event.event} + {Array.isArray(event.parameters) && event.parameters.length > 0 + ? event.parameters.map((param: EventParameter, i: number) => ( + <> + + {param.indexed && indexed } + {param.type} {param.name} + + {i < event.parameters!.length - 1 &&
} + + )) + : "-"} +
+
+
+ + diff --git a/src/features/ccip/components/api-reference/index.ts b/src/features/ccip/components/api-reference/index.ts index 4015c58ef62..01682421079 100644 --- a/src/features/ccip/components/api-reference/index.ts +++ b/src/features/ccip/components/api-reference/index.ts @@ -1 +1,2 @@ export { default as CCIPSendError } from "./Errors.astro" +export { default as CCIPEvent } from "./Events.astro" From a4d247020202e14a907b0f49b933e647b6ae2d17 Mon Sep 17 00:00:00 2001 From: SyedAsadKazmi Date: Thu, 13 Nov 2025 09:52:48 +0530 Subject: [PATCH 2/3] Added Internal and FeeQuoter API References --- .../ccip/events/v1_5_0/offramp-receive.json | 3 +- .../data/ccip/events/v1_5_0/onramp-send.json | 3 +- .../ccip/events/v1_5_1/offramp-receive.json | 3 +- .../data/ccip/events/v1_5_1/onramp-send.json | 3 +- .../ccip/events/v1_6_0/offramp-receive.json | 3 +- .../data/ccip/events/v1_6_0/onramp-send.json | 3 +- .../ccip/events/v1_6_1/offramp-receive.json | 3 +- .../data/ccip/events/v1_6_1/onramp-send.json | 3 +- .../ccip/events/v1_6_2/offramp-receive.json | 3 +- .../data/ccip/events/v1_6_2/onramp-send.json | 3 +- .../ccip/events/v1_6_3/offramp-receive.json | 3 +- .../data/ccip/events/v1_6_3/onramp-send.json | 3 +- src/config/data/ccip/types.ts | 1 + .../__snapshots__/ccip-dynamic.test.ts.snap | 44 + .../ccip/api-reference/evm/v1_5_0.json | 4 + .../ccip/api-reference/evm/v1_5_1.json | 8 + .../ccip/api-reference/evm/v1_6_0.json | 8 + .../ccip/api-reference/evm/v1_6_1.json | 8 + .../ccip/api-reference/evm/v1_6_2.json | 8 + .../ccip/api-reference/evm/v1_6_3.json | 8 + src/config/versions/page-availability.ts | 3 + .../ccip/api-reference/evm/v1.5.0/events.mdx | 10 +- .../api-reference/evm/v1.5.0/internal.mdx | 775 +++++++++++++++++ .../ccip/api-reference/evm/v1.5.1/events.mdx | 14 +- .../api-reference/evm/v1.5.1/fee-quoter.mdx | 674 +++++++++++++++ .../api-reference/evm/v1.5.1/internal.mdx | 777 ++++++++++++++++++ .../ccip/api-reference/evm/v1.6.0/events.mdx | 14 +- .../api-reference/evm/v1.6.0/fee-quoter.mdx | 536 ++++++++++++ .../api-reference/evm/v1.6.0/internal.mdx | 187 +++++ .../ccip/api-reference/evm/v1.6.1/events.mdx | 14 +- .../api-reference/evm/v1.6.1/fee-quoter.mdx | 536 ++++++++++++ .../api-reference/evm/v1.6.1/internal.mdx | 195 +++++ .../ccip/api-reference/evm/v1.6.2/events.mdx | 14 +- .../api-reference/evm/v1.6.2/fee-quoter.mdx | 518 ++++++++++++ .../api-reference/evm/v1.6.2/internal.mdx | 194 +++++ .../ccip/api-reference/evm/v1.6.3/events.mdx | 14 +- .../api-reference/evm/v1.6.3/fee-quoter.mdx | 518 ++++++++++++ .../api-reference/evm/v1.6.3/internal.mdx | 194 +++++ .../components/api-reference/Events.astro | 5 +- 39 files changed, 5263 insertions(+), 54 deletions(-) create mode 100644 src/content/ccip/api-reference/evm/v1.5.0/internal.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.5.1/fee-quoter.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.5.1/internal.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.0/fee-quoter.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.0/internal.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.1/fee-quoter.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.1/internal.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.2/fee-quoter.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.2/internal.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.3/fee-quoter.mdx create mode 100644 src/content/ccip/api-reference/evm/v1.6.3/internal.mdx diff --git a/src/config/data/ccip/events/v1_5_0/offramp-receive.json b/src/config/data/ccip/events/v1_5_0/offramp-receive.json index a6dd940926c..a43ebc53c20 100644 --- a/src/config/data/ccip/events/v1_5_0/offramp-receive.json +++ b/src/config/data/ccip/events/v1_5_0/offramp-receive.json @@ -25,7 +25,8 @@ { "type": "Internal.MessageExecutionState", "name": "state", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.5.0/internal#messageexecutionstate" }, { "type": "bytes", diff --git a/src/config/data/ccip/events/v1_5_0/onramp-send.json b/src/config/data/ccip/events/v1_5_0/onramp-send.json index 477f53296da..d45666e8488 100644 --- a/src/config/data/ccip/events/v1_5_0/onramp-send.json +++ b/src/config/data/ccip/events/v1_5_0/onramp-send.json @@ -15,7 +15,8 @@ { "type": "Internal.EVM2AnyRampMessage", "name": "message", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.5.0/internal#evm2anyrampmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_5_1/offramp-receive.json b/src/config/data/ccip/events/v1_5_1/offramp-receive.json index a6dd940926c..289d5d28380 100644 --- a/src/config/data/ccip/events/v1_5_1/offramp-receive.json +++ b/src/config/data/ccip/events/v1_5_1/offramp-receive.json @@ -25,7 +25,8 @@ { "type": "Internal.MessageExecutionState", "name": "state", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.5.1/internal#messageexecutionstate" }, { "type": "bytes", diff --git a/src/config/data/ccip/events/v1_5_1/onramp-send.json b/src/config/data/ccip/events/v1_5_1/onramp-send.json index 477f53296da..6f15fa665d8 100644 --- a/src/config/data/ccip/events/v1_5_1/onramp-send.json +++ b/src/config/data/ccip/events/v1_5_1/onramp-send.json @@ -15,7 +15,8 @@ { "type": "Internal.EVM2AnyRampMessage", "name": "message", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.5.1/internal#evm2anyrampmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_6_0/offramp-receive.json b/src/config/data/ccip/events/v1_6_0/offramp-receive.json index a6dd940926c..4eb6fe49bd6 100644 --- a/src/config/data/ccip/events/v1_6_0/offramp-receive.json +++ b/src/config/data/ccip/events/v1_6_0/offramp-receive.json @@ -25,7 +25,8 @@ { "type": "Internal.MessageExecutionState", "name": "state", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.0/internal#messageexecutionstate" }, { "type": "bytes", diff --git a/src/config/data/ccip/events/v1_6_0/onramp-send.json b/src/config/data/ccip/events/v1_6_0/onramp-send.json index 477f53296da..45c1c08f0eb 100644 --- a/src/config/data/ccip/events/v1_6_0/onramp-send.json +++ b/src/config/data/ccip/events/v1_6_0/onramp-send.json @@ -15,7 +15,8 @@ { "type": "Internal.EVM2AnyRampMessage", "name": "message", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.0/internal#evm2anyrampmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_6_1/offramp-receive.json b/src/config/data/ccip/events/v1_6_1/offramp-receive.json index a6dd940926c..12e9f105ba0 100644 --- a/src/config/data/ccip/events/v1_6_1/offramp-receive.json +++ b/src/config/data/ccip/events/v1_6_1/offramp-receive.json @@ -25,7 +25,8 @@ { "type": "Internal.MessageExecutionState", "name": "state", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.1/internal#messageexecutionstate" }, { "type": "bytes", diff --git a/src/config/data/ccip/events/v1_6_1/onramp-send.json b/src/config/data/ccip/events/v1_6_1/onramp-send.json index 477f53296da..295a7f9be9c 100644 --- a/src/config/data/ccip/events/v1_6_1/onramp-send.json +++ b/src/config/data/ccip/events/v1_6_1/onramp-send.json @@ -15,7 +15,8 @@ { "type": "Internal.EVM2AnyRampMessage", "name": "message", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.1/internal#evm2anyrampmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_6_2/offramp-receive.json b/src/config/data/ccip/events/v1_6_2/offramp-receive.json index a6dd940926c..af18495c11d 100644 --- a/src/config/data/ccip/events/v1_6_2/offramp-receive.json +++ b/src/config/data/ccip/events/v1_6_2/offramp-receive.json @@ -25,7 +25,8 @@ { "type": "Internal.MessageExecutionState", "name": "state", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.2/internal#messageexecutionstate" }, { "type": "bytes", diff --git a/src/config/data/ccip/events/v1_6_2/onramp-send.json b/src/config/data/ccip/events/v1_6_2/onramp-send.json index 477f53296da..84f2dadc344 100644 --- a/src/config/data/ccip/events/v1_6_2/onramp-send.json +++ b/src/config/data/ccip/events/v1_6_2/onramp-send.json @@ -15,7 +15,8 @@ { "type": "Internal.EVM2AnyRampMessage", "name": "message", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.2/internal#evm2anyrampmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_6_3/offramp-receive.json b/src/config/data/ccip/events/v1_6_3/offramp-receive.json index a6dd940926c..e283437681a 100644 --- a/src/config/data/ccip/events/v1_6_3/offramp-receive.json +++ b/src/config/data/ccip/events/v1_6_3/offramp-receive.json @@ -25,7 +25,8 @@ { "type": "Internal.MessageExecutionState", "name": "state", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.3/internal#messageexecutionstate" }, { "type": "bytes", diff --git a/src/config/data/ccip/events/v1_6_3/onramp-send.json b/src/config/data/ccip/events/v1_6_3/onramp-send.json index 477f53296da..6f7a9934efc 100644 --- a/src/config/data/ccip/events/v1_6_3/onramp-send.json +++ b/src/config/data/ccip/events/v1_6_3/onramp-send.json @@ -15,7 +15,8 @@ { "type": "Internal.EVM2AnyRampMessage", "name": "message", - "indexed": false + "indexed": false, + "typeLink": "/ccip/api-reference/evm/v1.6.3/internal#evm2anyrampmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/types.ts b/src/config/data/ccip/types.ts index 05c6286b876..1d7921f7709 100644 --- a/src/config/data/ccip/types.ts +++ b/src/config/data/ccip/types.ts @@ -169,6 +169,7 @@ export interface CCIPEventEntry { type: string name: string indexed: boolean + typeLink?: string }> description: string } diff --git a/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap b/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap index 72fac3e2e37..e6f6c738eef 100644 --- a/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap +++ b/src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap @@ -776,6 +776,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.3/client", }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.3/internal", + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.3/i-type-and-version", @@ -784,6 +788,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.3/i-router-client", }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.3/fee-quoter", + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.3/ccip-receiver", @@ -855,6 +863,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.2/client", }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.2/internal", + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.2/i-type-and-version", @@ -863,6 +875,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.2/i-router-client", }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.2/fee-quoter", + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.2/ccip-receiver", @@ -937,6 +953,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.1/client", }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.1/internal", + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.1/i-type-and-version", @@ -945,6 +965,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.1/i-router-client", }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.1/fee-quoter", + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.1/ccip-receiver", @@ -1019,6 +1043,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.0/client", }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.0/internal", + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.0/i-type-and-version", @@ -1027,6 +1055,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.0/i-router-client", }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.0/fee-quoter", + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.0/ccip-receiver", @@ -1101,6 +1133,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Client Library", "url": "ccip/api-reference/evm/v1.5.1/client", }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.5.1/internal", + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.5.1/i-type-and-version", @@ -1109,6 +1145,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.5.1/i-router-client", }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.5.1/fee-quoter", + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.5.1/ccip-receiver", @@ -1183,6 +1223,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s "title": "Client Library", "url": "ccip/api-reference/evm/v1.5.0/client", }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.5.0/internal", + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.5.0/i-type-and-version", diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json b/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json index 06d0efee1e3..0eabfd11295 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_5_0.json @@ -3,6 +3,10 @@ "title": "Client Library", "url": "ccip/api-reference/evm/v1.5.0/client" }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.5.0/internal" + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.5.0/i-type-and-version" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json b/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json index fe1fb7a4185..cabdb7b5fdc 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_5_1.json @@ -3,6 +3,10 @@ "title": "Client Library", "url": "ccip/api-reference/evm/v1.5.1/client" }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.5.1/internal" + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.5.1/i-type-and-version" @@ -11,6 +15,10 @@ "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.5.1/i-router-client" }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.5.1/fee-quoter" + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.5.1/ccip-receiver" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json index 934f9e94a85..40543765dea 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_0.json @@ -3,6 +3,10 @@ "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.0/client" }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.0/internal" + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.0/i-type-and-version" @@ -11,6 +15,10 @@ "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.0/i-router-client" }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.0/fee-quoter" + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.0/ccip-receiver" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json index f3afb826dd3..337f1f34507 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_1.json @@ -3,6 +3,10 @@ "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.1/client" }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.1/internal" + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.1/i-type-and-version" @@ -11,6 +15,10 @@ "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.1/i-router-client" }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.1/fee-quoter" + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.1/ccip-receiver" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json index 37f5528a33d..1024cb70079 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_2.json @@ -3,6 +3,10 @@ "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.2/client" }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.2/internal" + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.2/i-type-and-version" @@ -11,6 +15,10 @@ "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.2/i-router-client" }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.2/fee-quoter" + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.2/ccip-receiver" diff --git a/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json b/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json index fc14bddde6f..668807b6bde 100644 --- a/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json +++ b/src/config/sidebar/ccip/api-reference/evm/v1_6_3.json @@ -3,6 +3,10 @@ "title": "Client Library", "url": "ccip/api-reference/evm/v1.6.3/client" }, + { + "title": "Internal Library", + "url": "ccip/api-reference/evm/v1.6.3/internal" + }, { "title": "ITypeAndVersion", "url": "ccip/api-reference/evm/v1.6.3/i-type-and-version" @@ -11,6 +15,10 @@ "title": "IRouterClient", "url": "ccip/api-reference/evm/v1.6.3/i-router-client" }, + { + "title": "FeeQuoter", + "url": "ccip/api-reference/evm/v1.6.3/fee-quoter" + }, { "title": "CCIPReceiver", "url": "ccip/api-reference/evm/v1.6.3/ccip-receiver" diff --git a/src/config/versions/page-availability.ts b/src/config/versions/page-availability.ts index bb9f93708ec..dffe077596e 100644 --- a/src/config/versions/page-availability.ts +++ b/src/config/versions/page-availability.ts @@ -17,6 +17,9 @@ export const PAGE_AVAILABILITY: Record> "ownable-2-step": { notAvailableIn: ["v1.5.0"], }, + "fee-quoter": { + notAvailableIn: ["v1.5.0"], + }, }, "chainlink-local": { "mock-evm2evm-offramp": { diff --git a/src/content/ccip/api-reference/evm/v1.5.0/events.mdx b/src/content/ccip/api-reference/evm/v1.5.0/events.mdx index 6dda60c53a7..c3c3e25d251 100644 --- a/src/content/ccip/api-reference/evm/v1.5.0/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.5.0/events.mdx @@ -14,22 +14,22 @@ import { Aside, CopyText } from "@components" When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.5.0/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. -## ccipSend Events +## `ccipSend` These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.5.0/i-router-client#ccipsend). -### OnRamp Events +### OnRamp -## ccipReceive Events +## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. -### OffRamp Events +### OffRamp -### Router Events +### Router diff --git a/src/content/ccip/api-reference/evm/v1.5.0/internal.mdx b/src/content/ccip/api-reference/evm/v1.5.0/internal.mdx new file mode 100644 index 00000000000..f14c97a2f70 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.5.0/internal.mdx @@ -0,0 +1,775 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.5.0 Internal Library API Reference" +metadata: + description: "API documentation for the Internal library in Chainlink CCIP v1.5.0, providing core data structures for cross-chain message processing." + canonical: "/ccip/api-reference/evm/v1.5.1/internal" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## Internal + +A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing. + +[Git Source](https://github.com/smartcontractkit/ccip/tree/release/contracts-ccip-1.5.0/contracts/src/v0.8/ccip/libraries/Internal.sol) + +## Errors + +### InvalidEVMAddress + +```solidity +error InvalidEVMAddress(bytes encodedAddress); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------- | ------- | --------------------------- | +| `encodedAddress` | `bytes` | The invalid encoded address | + +## Enums + +### MessageExecutionState + +Enum listing the possible message execution states within the offRamp contract. + +```solidity +enum MessageExecutionState { + UNTOUCHED, + IN_PROGRESS, + SUCCESS, + FAILURE +} +``` + + + +### OCRPluginType + +CCIP OCR plugin type, used to separate execution & commit transmissions and configs. + +```solidity +enum OCRPluginType { + Commit, + Execution +} +``` + + + +## Structs + +### PriceUpdates + +A collection of token price and gas price updates. + +```solidity +struct PriceUpdates { + TokenPriceUpdate[] tokenPriceUpdates; + GasPriceUpdate[] gasPriceUpdates; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | ----------------------------------------- | ---------------------------- | +| `tokenPriceUpdates` | [`TokenPriceUpdate[]`](#tokenpriceupdate) | Array of token price updates | +| `gasPriceUpdates` | [`GasPriceUpdate[]`](#gaspriceupdate) | Array of gas price updates | + +### TokenPriceUpdate + +Token price in USD. + +```solidity +struct TokenPriceUpdate { + address sourceToken; + uint224 usdPerToken; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------- | --------- | ---------------------------------------------------- | +| `sourceToken` | `address` | Source token address | +| `usdPerToken` | `uint224` | 1e18 USD per 1e18 of the smallest token denomination | + +### GasPriceUpdate + +Gas price for a given chain in USD, its value may contain tightly packed fields. + +```solidity +struct GasPriceUpdate { + uint64 destChainSelector; + uint224 usdPerUnitGas; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `usdPerUnitGas` | `uint224` | 1e18 USD per smallest unit (e.g. wei) of destination chain gas | + +### TimestampedPackedUint224 + +A timestamped uint224 value that can contain several tightly packed fields. + +```solidity +struct TimestampedPackedUint224 { + uint224 value; + uint32 timestamp; +} +``` + +**Properties** + +| Name | Type | Description | +| ----------- | --------- | ------------------------------------------- | +| `value` | `uint224` | Value in uint224, can contain packed fields | +| `timestamp` | `uint32` | Timestamp of the most recent price update | + +### PoolUpdate + +Structure for token pool updates. + +```solidity +struct PoolUpdate { + address token; + address pool; +} +``` + +**Properties** + +| Name | Type | Description | +| ------- | --------- | ------------------------ | +| `token` | `address` | The IERC20 token address | +| `pool` | `address` | The token pool address | + +### SourceTokenData + +Structure containing token-specific data from the source chain. + +```solidity +struct SourceTokenData { + bytes sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint32 destGasAmount; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ------------------------------------------------------------------ | +| `sourcePoolAddress` | `bytes` | Source pool address, abi encoded (trusted) | +| `destTokenAddress` | `bytes` | Destination token address, abi encoded for EVM chains (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `destGasAmount` | `uint32` | Gas available for releaseOrMint and balanceOf calls on the offRamp | + +### ExecutionReportSingleChain + +Report submitted by the execution DON at the execution phase (including chain selector data). + +```solidity +struct ExecutionReportSingleChain { + uint64 sourceChainSelector; + Any2EVMRampMessage[] messages; + bytes[][] offchainTokenData; + bytes32[] proofs; + uint256 proofFlagBits; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------------------------------------------- | --------------------------------------------------- | +| `sourceChainSelector` | `uint64` | Source chain selector for which report is submitted | +| `messages` | [`Any2EVMRampMessage[]`](#any2evmrampmessage) | Array of messages to execute | +| `offchainTokenData` | `bytes[][]` | Bytes array for each message, per transferred token | +| `proofs` | `bytes32[]` | Merkle proofs | +| `proofFlagBits` | `uint256` | Bitmap of proof flags | + +### ExecutionReport + +Report submitted by the execution DON at the execution phase. + +```solidity +struct ExecutionReport { + EVM2EVMMessage[] messages; + bytes[][] offchainTokenData; + bytes32[] proofs; + uint256 proofFlagBits; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | ------------------------------------- | --------------------------------------------------- | +| `messages` | [`EVM2EVMMessage[]`](#evm2evmmessage) | Array of messages to execute | +| `offchainTokenData` | `bytes[][]` | Bytes array for each message, per transferred token | +| `proofs` | `bytes32[]` | Merkle proofs | +| `proofFlagBits` | `uint256` | Bitmap of proof flags | + +### EVM2EVMMessage + +The cross chain message that gets committed to EVM chains. + +```solidity +struct EVM2EVMMessage { + uint64 sourceChainSelector; + address sender; + address receiver; + uint64 sequenceNumber; + uint256 gasLimit; + bool strict; + uint64 nonce; + address feeToken; + uint256 feeTokenAmount; + bytes data; + Client.EVMTokenAmount[] tokenAmounts; + bytes[] sourceTokenData; + bytes32 messageId; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | ------------------------- | --------------------------------------------------------- | +| `sourceChainSelector` | `uint64` | Chain selector of the source chain (not chainId) | +| `sender` | `address` | Sender address on the source chain | +| `receiver` | `address` | Receiver address on the destination chain | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `gasLimit` | `uint256` | User supplied maximum gas for destination chain execution | +| `strict` | `bool` | DEPRECATED | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across lanes | +| `feeToken` | `address` | Fee token address | +| `feeTokenAmount` | `uint256` | Fee token amount | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `tokenAmounts` | `Client.EVMTokenAmount[]` | Array of tokens and amounts to transfer | +| `sourceTokenData` | `bytes[]` | Array of token data, one per token | +| `messageId` | `bytes32` | Hash of the message data | + +### RampMessageHeader + +Family-agnostic header for OnRamp & OffRamp messages. + +```solidity +struct RampMessageHeader { + bytes32 messageId; + uint64 sourceChainSelector; + uint64 destChainSelector; + uint64 sequenceNumber; + uint64 nonce; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | --------------------------------------------------------------- | +| `messageId` | `bytes32` | Unique identifier generated with source chain's encoding scheme | +| `sourceChainSelector` | `uint64` | CCIP chain selector of the source chain (not chainId) | +| `destChainSelector` | `uint64` | CCIP chain selector of the destination chain (not chainId) | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across senders/lanes | + +### EVM2AnyTokenTransfer + +Structure representing token transfers from EVM chains to any destination chain. + +```solidity +struct EVM2AnyTokenTransfer { + address sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint256 amount; + bytes destExecData; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ------------------------------------------------------------------ | +| `sourcePoolAddress` | `address` | Source pool EVM address (trusted) | +| `destTokenAddress` | `bytes` | EVM address of the destination token (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | +| `destExecData` | `bytes` | Destination chain execution data (e.g., gas amount for EVM chains) | + +### Any2EVMTokenTransfer + +Structure representing token transfers from any source chain to EVM chains. + +```solidity +struct Any2EVMTokenTransfer { + bytes sourcePoolAddress; + address destTokenAddress; + uint32 destGasAmount; + bytes extraData; + uint256 amount; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ----------------------------------------------------------------- | +| `sourcePoolAddress` | `bytes` | Source pool EVM address encoded to bytes (trusted) | +| `destTokenAddress` | `address` | Address of destination token | +| `destGasAmount` | `uint32` | Gas available for releaseOrMint and transfer calls on the offRamp | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | + +### Any2EVMRampMessage + +Family-agnostic message routed to an OffRamp. + +```solidity +struct Any2EVMRampMessage { + RampMessageHeader header; + bytes sender; + bytes data; + address receiver; + uint256 gasLimit; + Any2EVMTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| -------------- | ------------------------------------------------- | --------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `bytes` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `address` | Receiver address on the destination chain | +| `gasLimit` | `uint256` | User supplied maximum gas for destination chain execution | +| `tokenAmounts` | [`Any2EVMTokenTransfer[]`](#any2evmtokentransfer) | Array of tokens and amounts to transfer | + +### EVM2AnyRampMessage + +Family-agnostic message emitted from the OnRamp. + +```solidity +struct EVM2AnyRampMessage { + RampMessageHeader header; + address sender; + bytes data; + bytes receiver; + bytes extraArgs; + address feeToken; + uint256 feeTokenAmount; + uint256 feeValueJuels; + EVM2AnyTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------- | ------------------------------------------------- | -------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `address` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `bytes` | Receiver address on the destination chain | +| `extraArgs` | `bytes` | Destination-chain specific args (e.g., gasLimit for EVM) | +| `feeToken` | `address` | Token used to pay fees | +| `feeTokenAmount` | `uint256` | Amount of fee token paid | +| `feeValueJuels` | `uint256` | Fee amount denominated in Juels | +| `tokenAmounts` | [`EVM2AnyTokenTransfer[]`](#evm2anytokentransfer) | Array of tokens and amounts to transfer | + +### MerkleRoot + +Struct to hold a merkle root and an interval for a source chain. + +```solidity +struct MerkleRoot { + uint64 sourceChainSelector; + bytes onRampAddress; + uint64 minSeqNr; + uint64 maxSeqNr; + bytes32 merkleRoot; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | -------------------------------------------------------------- | +| `sourceChainSelector` | `uint64` | Remote source chain selector that the Merkle Root is scoped to | +| `onRampAddress` | `bytes` | Generic onramp address (for EVM, use abi.encode) | +| `minSeqNr` | `uint64` | Minimum sequence number, inclusive | +| `maxSeqNr` | `uint64` | Maximum sequence number, inclusive | +| `merkleRoot` | `bytes32` | Merkle root covering the interval & source chain messages | + +## State Variables + +### GAS_FOR_CALL_EXACT_CHECK + +```solidity +uint16 internal constant GAS_FOR_CALL_EXACT_CHECK = 5_000; +``` + + + +### MAX_RET_BYTES + +```solidity +uint16 internal constant MAX_RET_BYTES = 4 + 4 * 32; +``` + + + +### MAX_BALANCE_OF_RET_BYTES + +```solidity +uint256 internal constant MAX_BALANCE_OF_RET_BYTES = 32; +``` + + + +### GAS_PRICE_BITS + +```solidity +uint8 public constant GAS_PRICE_BITS = 112; +``` + + + +### MESSAGE_FIXED_BYTES + +```solidity +uint256 public constant MESSAGE_FIXED_BYTES = 32 * 17; +``` + + + +### MESSAGE_FIXED_BYTES_PER_TOKEN + +```solidity +uint256 public constant MESSAGE_FIXED_BYTES_PER_TOKEN = 32 * ((1 + 3 * 3) + 2); +``` + + + +### ANY_2_EVM_MESSAGE_FIXED_BYTES + +```solidity +uint256 public constant ANY_2_EVM_MESSAGE_FIXED_BYTES = 32 * 14; +``` + + + +### ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN + +```solidity +uint256 public constant ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN = 32 * 10; +``` + + + +### EVM_2_EVM_MESSAGE_HASH + +```solidity +bytes32 internal constant EVM_2_EVM_MESSAGE_HASH = keccak256("EVM2EVMMessageHashV2"); +``` + + + +### ANY_2_EVM_MESSAGE_HASH + +```solidity +bytes32 internal constant ANY_2_EVM_MESSAGE_HASH = keccak256("Any2EVMMessageHashV1"); +``` + + + +### EVM_2_ANY_MESSAGE_HASH + +```solidity +bytes32 internal constant EVM_2_ANY_MESSAGE_HASH = keccak256("EVM2AnyMessageHashV1"); +``` + + + +### CHAIN_FAMILY_SELECTOR_EVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c; +``` + + + +### PRECOMPILE_SPACE + +```solidity +uint256 public constant PRECOMPILE_SPACE = 1024; +``` + + + +## Functions + +### \_hash (EVM2EVMMessage) + +```solidity +function _hash( + EVM2EVMMessage memory original, + bytes32 metadataHash +) internal pure returns (bytes32); +``` + + + +**Parameters** + +| Name | Type | Description | +| -------------- | ----------------------------------- | --------------------------------------------------------------- | +| `original` | [`EVM2EVMMessage`](#evm2evmmessage) | Message to hash | +| `metadataHash` | `bytes32` | Immutable metadata hash representing a lane with a fixed OnRamp | + +**Returns** + +| Name | Type | Description | +| --------------- | --------- | ----------------------------- | +| `hashedMessage` | `bytes32` | Hashed message as a keccak256 | + +### \_hash (Any2EVMRampMessage) + +```solidity +function _hash( + Any2EVMRampMessage memory original, + bytes memory onRamp +) internal pure returns (bytes32); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------- | ------------------------------------------- | ------------------------------------------------------------------ | +| `original` | [`Any2EVMRampMessage`](#any2evmrampmessage) | OffRamp message to hash | +| `onRamp` | `bytes` | OnRamp to hash the message with - used to compute the metadataHash | + +**Returns** + +| Name | Type | Description | +| --------------- | --------- | ----------------------------- | +| `hashedMessage` | `bytes32` | Hashed message as a keccak256 | + +### \_hash (EVM2AnyRampMessage) + +```solidity +function _hash( + EVM2AnyRampMessage memory original, + bytes32 metadataHash +) internal pure returns (bytes32); +``` + + + +**Parameters** + +| Name | Type | Description | +| -------------- | ------------------------------------------- | ----------------------------------------- | +| `original` | [`EVM2AnyRampMessage`](#evm2anyrampmessage) | OnRamp message to hash | +| `metadataHash` | `bytes32` | Hash preimage to ensure global uniqueness | + +**Returns** + +| Name | Type | Description | +| --------------- | --------- | ----------------------------- | +| `hashedMessage` | `bytes32` | Hashed message as a keccak256 | + +### \_validateEVMAddress + +```solidity +function _validateEVMAddress( + bytes memory encodedAddress +) internal pure returns (address); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------- | ------- | ----------------------------------- | +| `encodedAddress` | `bytes` | The abi-encoded address to validate | + +**Returns** + +| Name | Type | Description | +| --------- | --------- | ------------------------------ | +| `address` | `address` | The validated address if valid | diff --git a/src/content/ccip/api-reference/evm/v1.5.1/events.mdx b/src/content/ccip/api-reference/evm/v1.5.1/events.mdx index d02c2e5d72f..17ae53a33a5 100644 --- a/src/content/ccip/api-reference/evm/v1.5.1/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.5.1/events.mdx @@ -14,30 +14,30 @@ import { Aside, CopyText } from "@components" When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.5.1/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. -## ccipSend Events +## `ccipSend` These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.5.1/i-router-client#ccipsend). -### OnRamp Events +### OnRamp -### Token Pool Events (Send) +### Token Pool (Send) -## ccipReceive Events +## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. -### OffRamp Events +### OffRamp -### Router Events +### Router -### Token Pool Events (Receive) +### Token Pool (Receive) diff --git a/src/content/ccip/api-reference/evm/v1.5.1/fee-quoter.mdx b/src/content/ccip/api-reference/evm/v1.5.1/fee-quoter.mdx new file mode 100644 index 00000000000..a6b411dbd8a --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.5.1/fee-quoter.mdx @@ -0,0 +1,674 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.5.1 FeeQuoter API Reference" +metadata: + description: "API documentation for the FeeQuoter contract in Chainlink CCIP v1.5.1, which manages gas and token prices for cross-chain fee calculations." + linkToWallet: false + image: "/files/72d4bd6-link-blog.png" + lastModified: "2024-08-15T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## FeeQuoter + +The FeeQuoter contract stores gas and token prices in USD, manages chain-specific fee calculations, and provides fee estimation for cross-chain messages. + +[Git Source](https://github.com/smartcontractkit/ccip/blob/0df0625eea603ba8572d5382d72979a7f2b12bfb/contracts/src/v0.8/ccip/FeeQuoter.sol) + +## Errors + +### TokenNotSupported + +```solidity +error TokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | ----------------------------- | +| `token` | `address` | The unsupported token address | + +### FeeTokenNotSupported + +```solidity +error FeeTokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | --------------------------------- | +| `token` | `address` | The unsupported fee token address | + +### StaleGasPrice + +```solidity +error StaleGasPrice(uint64 destChainSelector, uint256 threshold, uint256 timePassed); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `threshold` | `uint256` | The staleness threshold in seconds | +| `timePassed` | `uint256` | The time passed since last update in seconds | + +### StaleKeystoneUpdate + +```solidity +error StaleKeystoneUpdate(address token, uint256 feedTimestamp, uint256 storedTimeStamp); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------------- | --------- | ---------------------------------- | +| `token` | `address` | The token address | +| `feedTimestamp` | `uint256` | The timestamp from the feed update | +| `storedTimeStamp` | `uint256` | The currently stored timestamp | + +### DataFeedValueOutOfUint224Range + +```solidity +error DataFeedValueOutOfUint224Range(); +``` + + + +### InvalidDestBytesOverhead + +```solidity +error InvalidDestBytesOverhead(address token, uint32 destBytesOverhead); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------- | +| `token` | `address` | The token address | +| `destBytesOverhead` | `uint32` | The invalid destination bytes overhead | + +### MessageGasLimitTooHigh + +```solidity +error MessageGasLimitTooHigh(); +``` + + + +### DestinationChainNotEnabled + +```solidity +error DestinationChainNotEnabled(uint64 destChainSelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | --------------------------------------- | +| `destChainSelector` | `uint64` | The disabled destination chain selector | + +### ExtraArgOutOfOrderExecutionMustBeTrue + +```solidity +error ExtraArgOutOfOrderExecutionMustBeTrue(); +``` + + + +### InvalidExtraArgsTag + +```solidity +error InvalidExtraArgsTag(); +``` + + + +### SourceTokenDataTooLarge + +```solidity +error SourceTokenDataTooLarge(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | ------------------------------------ | +| `token` | `address` | The token with oversized source data | + +### InvalidDestChainConfig + +```solidity +error InvalidDestChainConfig(uint64 destChainSelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | -------------------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector with invalid config | + +### MessageFeeTooHigh + +```solidity +error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ---------------------------------------- | +| `msgFeeJuels` | `uint256` | Calculated message fee in Juels | +| `maxFeeJuelsPerMsg` | `uint256` | Maximum allowed fee in Juels per message | + +### InvalidStaticConfig + +```solidity +error InvalidStaticConfig(); +``` + + + +### MessageTooLarge + +```solidity +error MessageTooLarge(uint256 maxSize, uint256 actualSize); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------ | --------- | -------------------------------------- | +| `maxSize` | `uint256` | Maximum allowed message size | +| `actualSize` | `uint256` | Actual message size that was too large | + +### UnsupportedNumberOfTokens + +```solidity +error UnsupportedNumberOfTokens(); +``` + + + +## Events + +### FeeTokenAdded + +```solidity +event FeeTokenAdded(address indexed feeToken); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------- | --------- | ---------------------------- | +| `feeToken` | `address` | The fee token that was added | + +### FeeTokenRemoved + +```solidity +event FeeTokenRemoved(address indexed feeToken); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------- | --------- | ------------------------------ | +| `feeToken` | `address` | The fee token that was removed | + +### UsdPerUnitGasUpdated + +```solidity +event UsdPerUnitGasUpdated(uint64 indexed destChain, uint256 value, uint256 timestamp); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------- | --------- | -------------------------------------- | +| `destChain` | `uint64` | The destination chain selector | +| `value` | `uint256` | The new gas price in USD (18 decimals) | +| `timestamp` | `uint256` | The timestamp of the update | + +### UsdPerTokenUpdated + +```solidity +event UsdPerTokenUpdated(address indexed token, uint256 value, uint256 timestamp); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------- | --------- | ---------------------------------------- | +| `token` | `address` | The token address | +| `value` | `uint256` | The new token price in USD (18 decimals) | +| `timestamp` | `uint256` | The timestamp of the update | + +### PriceFeedPerTokenUpdated + +```solidity +event PriceFeedPerTokenUpdated(address indexed token, TokenPriceFeedConfig priceFeedConfig); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------------- | ----------------------------------------------- | -------------------------------- | +| `token` | `address` | The token address | +| `priceFeedConfig` | [`TokenPriceFeedConfig`](#tokenpricefeedconfig) | The new price feed configuration | + +### TokenTransferFeeConfigUpdated + +```solidity +event TokenTransferFeeConfigUpdated( + uint64 indexed destChainSelector, + address indexed token, + TokenTransferFeeConfig tokenTransferFeeConfig +); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------ | --------------------------------------------------- | ---------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `token` | `address` | The token address | +| `tokenTransferFeeConfig` | [`TokenTransferFeeConfig`](#tokentransferfeeconfig) | The new token transfer fee configuration | + +### TokenTransferFeeConfigDeleted + +```solidity +event TokenTransferFeeConfigDeleted(uint64 indexed destChainSelector, address indexed token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ------------------------------ | +| `destChainSelector` | `uint64` | The destination chain selector | +| `token` | `address` | The token address | + +### PremiumMultiplierWeiPerEthUpdated + +```solidity +event PremiumMultiplierWeiPerEthUpdated(address indexed token, uint64 premiumMultiplierWeiPerEth); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------------------- | --------- | ---------------------------------------- | +| `token` | `address` | The token address | +| `premiumMultiplierWeiPerEth` | `uint64` | The new premium multiplier (wei per ETH) | + +### DestChainConfigUpdated + +```solidity +event DestChainConfigUpdated(uint64 indexed destChainSelector, DestChainConfig destChainConfig); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | ------------------------------------- | --------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `destChainConfig` | [`DestChainConfig`](#destchainconfig) | The new destination chain configuration | + +### DestChainAdded + +```solidity +event DestChainAdded(uint64 indexed destChainSelector, DestChainConfig destChainConfig); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | ------------------------------------- | ----------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `destChainConfig` | [`DestChainConfig`](#destchainconfig) | The destination chain configuration | + +## Structs + +### TokenPriceFeedConfig + +Token price data feed configuration. + +```solidity +struct TokenPriceFeedConfig { + address dataFeedAddress; + uint8 tokenDecimals; +} +``` + +**Properties** + +| Name | Type | Description | +| ----------------- | --------- | ----------------------------------------------------------- | +| `dataFeedAddress` | `address` | AggregatorV3Interface contract address (0 if feed is unset) | +| `tokenDecimals` | `uint8` | Decimals of the token that the feed represents | + +### TokenPriceFeedUpdate + +Token price data feed update. + +```solidity +struct TokenPriceFeedUpdate { + address sourceToken; + TokenPriceFeedConfig feedConfig; +} +``` + +**Properties** + +| Name | Type | Description | +| ------------- | ----------------------------------------------- | ------------------------------- | +| `sourceToken` | `address` | Source token to update feed for | +| `feedConfig` | [`TokenPriceFeedConfig`](#tokenpricefeedconfig) | Feed config update data | + +### StaticConfig + +Struct that contains the static configuration. + +```solidity +struct StaticConfig { + uint96 maxFeeJuelsPerMsg; + address linkToken; + uint32 tokenPriceStalenessThreshold; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------------ | --------- | ------------------------------------------------------------------- | +| `maxFeeJuelsPerMsg` | `uint96` | Maximum fee that can be charged for a message | +| `linkToken` | `address` | LINK token address | +| `tokenPriceStalenessThreshold` | `uint32` | Time (seconds) a token price can be stale before considered invalid | + +### ReceivedCCIPFeedReport + +The struct representing the received CCIP feed report from Keystone IReceiver.onReport(). + +```solidity +struct ReceivedCCIPFeedReport { + address token; + uint224 price; + uint32 timestamp; +} +``` + +**Properties** + +| Name | Type | Description | +| ----------- | --------- | ------------------------------------------ | +| `token` | `address` | Token address | +| `price` | `uint224` | Price of the token in USD with 18 decimals | +| `timestamp` | `uint32` | Timestamp of the price update | + +### DestChainConfig + +Struct to hold the fee & validation configs for a destination chain. + +```solidity +struct DestChainConfig { + bool isEnabled; + uint16 maxNumberOfTokensPerMsg; + uint32 maxDataBytes; + uint32 maxPerMsgGasLimit; + uint32 destGasOverhead; + uint16 destGasPerPayloadByte; + uint32 destDataAvailabilityOverheadGas; + uint16 destGasPerDataAvailabilityByte; + uint16 destDataAvailabilityMultiplierBps; + uint16 defaultTokenFeeUSDCents; + uint32 defaultTokenDestGasOverhead; + uint32 defaultTxGasLimit; + uint64 gasMultiplierWeiPerEth; + uint32 networkFeeUSDCents; + uint32 gasPriceStalenessThreshold; + bool enforceOutOfOrder; + bytes4 chainFamilySelector; +} +``` + +**Properties** + +| Name | Type | Description | +| ----------------------------------- | -------- | -------------------------------------------------------------------------------- | +| `isEnabled` | `bool` | Whether this destination chain is enabled | +| `maxNumberOfTokensPerMsg` | `uint16` | Maximum number of distinct ERC20 tokens transferred per message | +| `maxDataBytes` | `uint32` | Maximum payload data size in bytes | +| `maxPerMsgGasLimit` | `uint32` | Maximum gas limit for messages targeting EVMs | +| `destGasOverhead` | `uint32` | Gas charged on top of gasLimit to cover destination chain costs | +| `destGasPerPayloadByte` | `uint16` | Destination chain gas charged for passing each byte of data payload to receiver | +| `destDataAvailabilityOverheadGas` | `uint32` | Extra data availability gas charged on top of the message, e.g. for OCR | +| `destGasPerDataAvailabilityByte` | `uint16` | Amount of gas to charge per byte of message data that needs availability | +| `destDataAvailabilityMultiplierBps` | `uint16` | Multiplier for data availability gas, multiples of bps, or 0.0001 | +| `defaultTokenFeeUSDCents` | `uint16` | Default token fee charged per token transfer (overridable per token) | +| `defaultTokenDestGasOverhead` | `uint32` | Default gas charged to execute token transfer on destination chain (overridable) | +| `defaultTxGasLimit` | `uint32` | Default gas limit for a transaction | +| `gasMultiplierWeiPerEth` | `uint64` | Multiplier for gas costs, 1e18 based (e.g., 11e17 = 10% extra cost) | +| `networkFeeUSDCents` | `uint32` | Flat network fee to charge for messages, multiples of 0.01 USD | +| `gasPriceStalenessThreshold` | `uint32` | Time (seconds) a gas price can be stale before invalid (0 means disabled) | +| `enforceOutOfOrder` | `bool` | Whether to enforce the allowOutOfOrderExecution extraArg value to be true | +| `chainFamilySelector` | `bytes4` | Selector identifying the destination chain's family (determines validations) | + +### DestChainConfigArgs + +Struct to hold the configs and its destination chain selector. + +```solidity +struct DestChainConfigArgs { + uint64 destChainSelector; + DestChainConfig destChainConfig; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | ------------------------------------- | --------------------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `destChainConfig` | [`DestChainConfig`](#destchainconfig) | Config to update for the chain selector | + +### TokenTransferFeeConfig + +Struct to hold the transfer fee configuration for token transfers. + +```solidity +struct TokenTransferFeeConfig { + uint32 minFeeUSDCents; + uint32 maxFeeUSDCents; + uint16 deciBps; + uint32 destGasOverhead; + uint32 destBytesOverhead; + bool isEnabled; +} +``` + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- | +| `minFeeUSDCents` | `uint32` | Minimum fee to charge per token transfer, multiples of 0.01 USD | +| `maxFeeUSDCents` | `uint32` | Maximum fee to charge per token transfer, multiples of 0.01 USD | +| `deciBps` | `uint16` | Basis points charged on token transfers, multiples of 0.1bps, or 1e-5 | +| `destGasOverhead` | `uint32` | Gas charged to execute the token transfer on the destination chain | +| `destBytesOverhead` | `uint32` | Extra data availability bytes from source pool sent to destination pool. Must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES | +| `isEnabled` | `bool` | Whether this token has custom transfer fees | + +### TokenTransferFeeConfigSingleTokenArgs + +Struct to hold the token transfer fee configurations for a token. + +```solidity +struct TokenTransferFeeConfigSingleTokenArgs { + address token; + TokenTransferFeeConfig tokenTransferFeeConfig; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------ | --------------------------------------------------- | ------------------------------------ | +| `token` | `address` | Token address | +| `tokenTransferFeeConfig` | [`TokenTransferFeeConfig`](#tokentransferfeeconfig) | Transfer fee configuration for token | + +### TokenTransferFeeConfigArgs + +Struct to hold the token transfer fee configurations for a destination chain and a set of tokens. + +```solidity +struct TokenTransferFeeConfigArgs { + uint64 destChainSelector; + TokenTransferFeeConfigSingleTokenArgs[] tokenTransferFeeConfigs; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------ | +| `destChainSelector` | `uint64` | Destination chain selector | +| `tokenTransferFeeConfigs` | [`TokenTransferFeeConfigSingleTokenArgs[]`](#tokentransferfeeconfigsingletokenargs) | Array of token transfer fee configurations | + +### TokenTransferFeeConfigRemoveArgs + +Struct to hold a pair of destination chain selector and token address. + +```solidity +struct TokenTransferFeeConfigRemoveArgs { + uint64 destChainSelector; + address token; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `token` | `address` | Token address | + +### PremiumMultiplierWeiPerEthArgs + +Struct to hold the fee token configuration for a token. + +```solidity +struct PremiumMultiplierWeiPerEthArgs { + address token; + uint64 premiumMultiplierWeiPerEth; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------------------- | --------- | -------------------------------------------------- | +| `token` | `address` | Token address | +| `premiumMultiplierWeiPerEth` | `uint64` | Multiplier for destination chain specific premiums | + +## State Variables + +### FEE_BASE_DECIMALS + +```solidity +uint256 public constant FEE_BASE_DECIMALS = 36; +``` + + + +### KEYSTONE_PRICE_DECIMALS + +```solidity +uint256 public constant KEYSTONE_PRICE_DECIMALS = 18; +``` + + + +### typeAndVersion + +```solidity +string public constant override typeAndVersion = "FeeQuoter 1.6.0-dev"; +``` + + diff --git a/src/content/ccip/api-reference/evm/v1.5.1/internal.mdx b/src/content/ccip/api-reference/evm/v1.5.1/internal.mdx new file mode 100644 index 00000000000..7ef81e36ec9 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.5.1/internal.mdx @@ -0,0 +1,777 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.5.1 Internal Library API Reference" +metadata: + description: "API documentation for the Internal library in Chainlink CCIP v1.5.1, providing core data structures for cross-chain message processing." + linkToWallet: false + image: "/files/72d4bd6-link-blog.png" + lastModified: "2024-08-15T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## Internal + +A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing. + +[Git Source](https://github.com/smartcontractkit/ccip/blob/0df0625eea603ba8572d5382d72979a7f2b12bfb/contracts/src/v0.8/ccip/libraries/Internal.sol) + +## Errors + +### InvalidEVMAddress + +```solidity +error InvalidEVMAddress(bytes encodedAddress); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------- | ------- | --------------------------- | +| `encodedAddress` | `bytes` | The invalid encoded address | + +## Enums + +### MessageExecutionState + +Enum listing the possible message execution states within the offRamp contract. + +```solidity +enum MessageExecutionState { + UNTOUCHED, + IN_PROGRESS, + SUCCESS, + FAILURE +} +``` + + + +### OCRPluginType + +CCIP OCR plugin type, used to separate execution & commit transmissions and configs. + +```solidity +enum OCRPluginType { + Commit, + Execution +} +``` + + + +## Structs + +### PriceUpdates + +A collection of token price and gas price updates. + +```solidity +struct PriceUpdates { + TokenPriceUpdate[] tokenPriceUpdates; + GasPriceUpdate[] gasPriceUpdates; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | ----------------------------------------- | ---------------------------- | +| `tokenPriceUpdates` | [`TokenPriceUpdate[]`](#tokenpriceupdate) | Array of token price updates | +| `gasPriceUpdates` | [`GasPriceUpdate[]`](#gaspriceupdate) | Array of gas price updates | + +### TokenPriceUpdate + +Token price in USD. + +```solidity +struct TokenPriceUpdate { + address sourceToken; + uint224 usdPerToken; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------- | --------- | ---------------------------------------------------- | +| `sourceToken` | `address` | Source token address | +| `usdPerToken` | `uint224` | 1e18 USD per 1e18 of the smallest token denomination | + +### GasPriceUpdate + +Gas price for a given chain in USD, its value may contain tightly packed fields. + +```solidity +struct GasPriceUpdate { + uint64 destChainSelector; + uint224 usdPerUnitGas; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `usdPerUnitGas` | `uint224` | 1e18 USD per smallest unit (e.g. wei) of destination chain gas | + +### TimestampedPackedUint224 + +A timestamped uint224 value that can contain several tightly packed fields. + +```solidity +struct TimestampedPackedUint224 { + uint224 value; + uint32 timestamp; +} +``` + +**Properties** + +| Name | Type | Description | +| ----------- | --------- | ------------------------------------------- | +| `value` | `uint224` | Value in uint224, can contain packed fields | +| `timestamp` | `uint32` | Timestamp of the most recent price update | + +### PoolUpdate + +Structure for token pool updates. + +```solidity +struct PoolUpdate { + address token; + address pool; +} +``` + +**Properties** + +| Name | Type | Description | +| ------- | --------- | ------------------------ | +| `token` | `address` | The IERC20 token address | +| `pool` | `address` | The token pool address | + +### SourceTokenData + +Structure containing token-specific data from the source chain. + +```solidity +struct SourceTokenData { + bytes sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint32 destGasAmount; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ------------------------------------------------------------------ | +| `sourcePoolAddress` | `bytes` | Source pool address, abi encoded (trusted) | +| `destTokenAddress` | `bytes` | Destination token address, abi encoded for EVM chains (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `destGasAmount` | `uint32` | Gas available for releaseOrMint and balanceOf calls on the offRamp | + +### ExecutionReportSingleChain + +Report submitted by the execution DON at the execution phase (including chain selector data). + +```solidity +struct ExecutionReportSingleChain { + uint64 sourceChainSelector; + Any2EVMRampMessage[] messages; + bytes[][] offchainTokenData; + bytes32[] proofs; + uint256 proofFlagBits; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------------------------------------------- | --------------------------------------------------- | +| `sourceChainSelector` | `uint64` | Source chain selector for which report is submitted | +| `messages` | [`Any2EVMRampMessage[]`](#any2evmrampmessage) | Array of messages to execute | +| `offchainTokenData` | `bytes[][]` | Bytes array for each message, per transferred token | +| `proofs` | `bytes32[]` | Merkle proofs | +| `proofFlagBits` | `uint256` | Bitmap of proof flags | + +### ExecutionReport + +Report submitted by the execution DON at the execution phase. + +```solidity +struct ExecutionReport { + EVM2EVMMessage[] messages; + bytes[][] offchainTokenData; + bytes32[] proofs; + uint256 proofFlagBits; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | ------------------------------------- | --------------------------------------------------- | +| `messages` | [`EVM2EVMMessage[]`](#evm2evmmessage) | Array of messages to execute | +| `offchainTokenData` | `bytes[][]` | Bytes array for each message, per transferred token | +| `proofs` | `bytes32[]` | Merkle proofs | +| `proofFlagBits` | `uint256` | Bitmap of proof flags | + +### EVM2EVMMessage + +The cross chain message that gets committed to EVM chains. + +```solidity +struct EVM2EVMMessage { + uint64 sourceChainSelector; + address sender; + address receiver; + uint64 sequenceNumber; + uint256 gasLimit; + bool strict; + uint64 nonce; + address feeToken; + uint256 feeTokenAmount; + bytes data; + Client.EVMTokenAmount[] tokenAmounts; + bytes[] sourceTokenData; + bytes32 messageId; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | ------------------------- | --------------------------------------------------------- | +| `sourceChainSelector` | `uint64` | Chain selector of the source chain (not chainId) | +| `sender` | `address` | Sender address on the source chain | +| `receiver` | `address` | Receiver address on the destination chain | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `gasLimit` | `uint256` | User supplied maximum gas for destination chain execution | +| `strict` | `bool` | DEPRECATED | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across lanes | +| `feeToken` | `address` | Fee token address | +| `feeTokenAmount` | `uint256` | Fee token amount | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `tokenAmounts` | `Client.EVMTokenAmount[]` | Array of tokens and amounts to transfer | +| `sourceTokenData` | `bytes[]` | Array of token data, one per token | +| `messageId` | `bytes32` | Hash of the message data | + +### RampMessageHeader + +Family-agnostic header for OnRamp & OffRamp messages. + +```solidity +struct RampMessageHeader { + bytes32 messageId; + uint64 sourceChainSelector; + uint64 destChainSelector; + uint64 sequenceNumber; + uint64 nonce; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | --------------------------------------------------------------- | +| `messageId` | `bytes32` | Unique identifier generated with source chain's encoding scheme | +| `sourceChainSelector` | `uint64` | CCIP chain selector of the source chain (not chainId) | +| `destChainSelector` | `uint64` | CCIP chain selector of the destination chain (not chainId) | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across senders/lanes | + +### EVM2AnyTokenTransfer + +Structure representing token transfers from EVM chains to any destination chain. + +```solidity +struct EVM2AnyTokenTransfer { + address sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint256 amount; + bytes destExecData; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ------------------------------------------------------------------ | +| `sourcePoolAddress` | `address` | Source pool EVM address (trusted) | +| `destTokenAddress` | `bytes` | EVM address of the destination token (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | +| `destExecData` | `bytes` | Destination chain execution data (e.g., gas amount for EVM chains) | + +### Any2EVMTokenTransfer + +Structure representing token transfers from any source chain to EVM chains. + +```solidity +struct Any2EVMTokenTransfer { + bytes sourcePoolAddress; + address destTokenAddress; + uint32 destGasAmount; + bytes extraData; + uint256 amount; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ----------------------------------------------------------------- | +| `sourcePoolAddress` | `bytes` | Source pool EVM address encoded to bytes (trusted) | +| `destTokenAddress` | `address` | Address of destination token | +| `destGasAmount` | `uint32` | Gas available for releaseOrMint and transfer calls on the offRamp | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | + +### Any2EVMRampMessage + +Family-agnostic message routed to an OffRamp. + +```solidity +struct Any2EVMRampMessage { + RampMessageHeader header; + bytes sender; + bytes data; + address receiver; + uint256 gasLimit; + Any2EVMTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| -------------- | ------------------------------------------------- | --------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `bytes` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `address` | Receiver address on the destination chain | +| `gasLimit` | `uint256` | User supplied maximum gas for destination chain execution | +| `tokenAmounts` | [`Any2EVMTokenTransfer[]`](#any2evmtokentransfer) | Array of tokens and amounts to transfer | + +### EVM2AnyRampMessage + +Family-agnostic message emitted from the OnRamp. + +```solidity +struct EVM2AnyRampMessage { + RampMessageHeader header; + address sender; + bytes data; + bytes receiver; + bytes extraArgs; + address feeToken; + uint256 feeTokenAmount; + uint256 feeValueJuels; + EVM2AnyTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------- | ------------------------------------------------- | -------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `address` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `bytes` | Receiver address on the destination chain | +| `extraArgs` | `bytes` | Destination-chain specific args (e.g., gasLimit for EVM) | +| `feeToken` | `address` | Token used to pay fees | +| `feeTokenAmount` | `uint256` | Amount of fee token paid | +| `feeValueJuels` | `uint256` | Fee amount denominated in Juels | +| `tokenAmounts` | [`EVM2AnyTokenTransfer[]`](#evm2anytokentransfer) | Array of tokens and amounts to transfer | + +### MerkleRoot + +Struct to hold a merkle root and an interval for a source chain. + +```solidity +struct MerkleRoot { + uint64 sourceChainSelector; + bytes onRampAddress; + uint64 minSeqNr; + uint64 maxSeqNr; + bytes32 merkleRoot; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | -------------------------------------------------------------- | +| `sourceChainSelector` | `uint64` | Remote source chain selector that the Merkle Root is scoped to | +| `onRampAddress` | `bytes` | Generic onramp address (for EVM, use abi.encode) | +| `minSeqNr` | `uint64` | Minimum sequence number, inclusive | +| `maxSeqNr` | `uint64` | Maximum sequence number, inclusive | +| `merkleRoot` | `bytes32` | Merkle root covering the interval & source chain messages | + +## State Variables + +### GAS_FOR_CALL_EXACT_CHECK + +```solidity +uint16 internal constant GAS_FOR_CALL_EXACT_CHECK = 5_000; +``` + + + +### MAX_RET_BYTES + +```solidity +uint16 internal constant MAX_RET_BYTES = 4 + 4 * 32; +``` + + + +### MAX_BALANCE_OF_RET_BYTES + +```solidity +uint256 internal constant MAX_BALANCE_OF_RET_BYTES = 32; +``` + + + +### GAS_PRICE_BITS + +```solidity +uint8 public constant GAS_PRICE_BITS = 112; +``` + + + +### MESSAGE_FIXED_BYTES + +```solidity +uint256 public constant MESSAGE_FIXED_BYTES = 32 * 17; +``` + + + +### MESSAGE_FIXED_BYTES_PER_TOKEN + +```solidity +uint256 public constant MESSAGE_FIXED_BYTES_PER_TOKEN = 32 * ((1 + 3 * 3) + 2); +``` + + + +### ANY_2_EVM_MESSAGE_FIXED_BYTES + +```solidity +uint256 public constant ANY_2_EVM_MESSAGE_FIXED_BYTES = 32 * 14; +``` + + + +### ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN + +```solidity +uint256 public constant ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN = 32 * ((2 * 3) + 3); +``` + + + +### EVM_2_EVM_MESSAGE_HASH + +```solidity +bytes32 internal constant EVM_2_EVM_MESSAGE_HASH = keccak256("EVM2EVMMessageHashV2"); +``` + + + +### ANY_2_EVM_MESSAGE_HASH + +```solidity +bytes32 internal constant ANY_2_EVM_MESSAGE_HASH = keccak256("Any2EVMMessageHashV1"); +``` + + + +### EVM_2_ANY_MESSAGE_HASH + +```solidity +bytes32 internal constant EVM_2_ANY_MESSAGE_HASH = keccak256("EVM2AnyMessageHashV1"); +``` + + + +### CHAIN_FAMILY_SELECTOR_EVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c; +``` + + + +### PRECOMPILE_SPACE + +```solidity +uint256 public constant PRECOMPILE_SPACE = 1024; +``` + + + +## Functions + +### \_hash (EVM2EVMMessage) + +```solidity +function _hash( + EVM2EVMMessage memory original, + bytes32 metadataHash +) internal pure returns (bytes32); +``` + + + +**Parameters** + +| Name | Type | Description | +| -------------- | ----------------------------------- | --------------------------------------------------------------- | +| `original` | [`EVM2EVMMessage`](#evm2evmmessage) | Message to hash | +| `metadataHash` | `bytes32` | Immutable metadata hash representing a lane with a fixed OnRamp | + +**Returns** + +| Name | Type | Description | +| --------------- | --------- | ----------------------------- | +| `hashedMessage` | `bytes32` | Hashed message as a keccak256 | + +### \_hash (Any2EVMRampMessage) + +```solidity +function _hash( + Any2EVMRampMessage memory original, + bytes32 metadataHash +) internal pure returns (bytes32); +``` + + + +**Parameters** + +| Name | Type | Description | +| -------------- | ------------------------------------------- | ----------------------------------------- | +| `original` | [`Any2EVMRampMessage`](#any2evmrampmessage) | OffRamp message to hash | +| `metadataHash` | `bytes32` | Hash preimage to ensure global uniqueness | + +**Returns** + +| Name | Type | Description | +| --------------- | --------- | ----------------------------- | +| `hashedMessage` | `bytes32` | Hashed message as a keccak256 | + +### \_hash (EVM2AnyRampMessage) + +```solidity +function _hash( + EVM2AnyRampMessage memory original, + bytes32 metadataHash +) internal pure returns (bytes32); +``` + + + +**Parameters** + +| Name | Type | Description | +| -------------- | ------------------------------------------- | ----------------------------------------- | +| `original` | [`EVM2AnyRampMessage`](#evm2anyrampmessage) | OnRamp message to hash | +| `metadataHash` | `bytes32` | Hash preimage to ensure global uniqueness | + +**Returns** + +| Name | Type | Description | +| --------------- | --------- | ----------------------------- | +| `hashedMessage` | `bytes32` | Hashed message as a keccak256 | + +### \_validateEVMAddress + +```solidity +function _validateEVMAddress( + bytes memory encodedAddress +) internal pure returns (address); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------- | ------- | ----------------------------------- | +| `encodedAddress` | `bytes` | The abi-encoded address to validate | + +**Returns** + +| Name | Type | Description | +| --------- | --------- | ------------------------------ | +| `address` | `address` | The validated address if valid | diff --git a/src/content/ccip/api-reference/evm/v1.6.0/events.mdx b/src/content/ccip/api-reference/evm/v1.6.0/events.mdx index 7945752cb3b..90c9aeceb8a 100644 --- a/src/content/ccip/api-reference/evm/v1.6.0/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.0/events.mdx @@ -14,30 +14,30 @@ import { Aside, CopyText } from "@components" When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.0/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. -## ccipSend Events +## `ccipSend` These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.0/i-router-client#ccipsend). -### OnRamp Events +### OnRamp -### Token Pool Events (Send) +### Token Pool (Send) -## ccipReceive Events +## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. -### OffRamp Events +### OffRamp -### Router Events +### Router -### Token Pool Events (Receive) +### Token Pool (Receive) diff --git a/src/content/ccip/api-reference/evm/v1.6.0/fee-quoter.mdx b/src/content/ccip/api-reference/evm/v1.6.0/fee-quoter.mdx new file mode 100644 index 00000000000..c9df26599ef --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.0/fee-quoter.mdx @@ -0,0 +1,536 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.0 FeeQuoter API Reference" +metadata: + version: "1.6.0" + description: "CCIP v1.6.0 FeeQuoter API Reference" + linkToWallet: false + image: "/files/930cbb7-link-symbol.svg" + datePublished: "2025-10-15T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## FeeQuoter + +The FeeQuoter contract stores gas and token prices in USD, manages chain-specific fee calculations, and provides fee estimation for cross-chain messages. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.0/chains/evm/contracts/FeeQuoter.sol) + +## Errors + +### TokenNotSupported + +```solidity +error TokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | ----------------------------- | +| `token` | `address` | The unsupported token address | + +### FeeTokenNotSupported + +```solidity +error FeeTokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | --------------------------------- | +| `token` | `address` | The unsupported fee token address | + +### StaleGasPrice + +```solidity +error StaleGasPrice(uint64 destChainSelector, uint256 threshold, uint256 timePassed); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `threshold` | `uint256` | The staleness threshold in seconds | +| `timePassed` | `uint256` | The time passed since last update in seconds | + +### MessageGasLimitTooHigh + +```solidity +error MessageGasLimitTooHigh(); +``` + + + +### MessageComputeUnitLimitTooHigh + +```solidity +error MessageComputeUnitLimitTooHigh(); +``` + + + +### DestinationChainNotEnabled + +```solidity +error DestinationChainNotEnabled(uint64 destChainSelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | --------------------------------------- | +| `destChainSelector` | `uint64` | The disabled destination chain selector | + +### ExtraArgOutOfOrderExecutionMustBeTrue + +```solidity +error ExtraArgOutOfOrderExecutionMustBeTrue(); +``` + + + +### InvalidExtraArgsTag + +```solidity +error InvalidExtraArgsTag(); +``` + + + +### InvalidExtraArgsData + +```solidity +error InvalidExtraArgsData(); +``` + + + +### MessageTooLarge + +```solidity +error MessageTooLarge(uint256 maxSize, uint256 actualSize); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------ | --------- | -------------------------------------- | +| `maxSize` | `uint256` | Maximum allowed message size | +| `actualSize` | `uint256` | Actual message size that was too large | + +### UnsupportedNumberOfTokens + +```solidity +error UnsupportedNumberOfTokens(uint256 numberOfTokens, uint256 maxNumberOfTokensPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | -------------------------------------------- | +| `numberOfTokens` | `uint256` | Number of tokens in the message | +| `maxNumberOfTokensPerMsg` | `uint256` | Maximum allowed number of tokens per message | + +### MessageFeeTooHigh + +```solidity +error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ---------------------------------------- | +| `msgFeeJuels` | `uint256` | Calculated message fee in Juels | +| `maxFeeJuelsPerMsg` | `uint256` | Maximum allowed fee in Juels per message | + +### InvalidTokenReceiver + +```solidity +error InvalidTokenReceiver(); +``` + + + +### TooManySVMExtraArgsAccounts + +```solidity +error TooManySVMExtraArgsAccounts(uint256 numAccounts, uint256 maxAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------- | --------- | ---------------------------------- | +| `numAccounts` | `uint256` | Number of accounts provided | +| `maxAccounts` | `uint256` | Maximum allowed number of accounts | + +### InvalidSVMExtraArgsWritableBitmap + +```solidity +error InvalidSVMExtraArgsWritableBitmap(uint64 accountIsWritableBitmap, uint256 numAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | ------------------------------------ | +| `accountIsWritableBitmap` | `uint64` | The provided writable bitmap | +| `numAccounts` | `uint256` | Number of accounts in the extra args | + +### TooManySuiExtraArgsReceiverObjectIds + +```solidity +error TooManySuiExtraArgsReceiverObjectIds(uint256 numReceiverObjectIds, uint256 maxReceiverObjectIds); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------------- | --------- | --------------------------------------------- | +| `numReceiverObjectIds` | `uint256` | Number of receiver object IDs provided | +| `maxReceiverObjectIds` | `uint256` | Maximum allowed number of receiver object IDs | + +### InvalidChainFamilySelector + +```solidity +error InvalidChainFamilySelector(bytes4 chainFamilySelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| --------------------- | -------- | --------------------------------- | +| `chainFamilySelector` | `bytes4` | The invalid chain family selector | + +## Structs + +### TokenTransferFeeConfig + +Structure defining the fee configuration for token transfers. + +```solidity +struct TokenTransferFeeConfig { + uint32 minFeeUSDCents; + uint32 maxFeeUSDCents; + uint16 deciBps; + uint32 destGasOverhead; + uint32 destBytesOverhead; + bool isEnabled; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ------------------------------------------------------------------------------------------------- | +| `minFeeUSDCents` | `uint32` | Minimum fee to charge per token transfer, multiples of 0.01 USD | +| `maxFeeUSDCents` | `uint32` | Maximum fee to charge per token transfer, multiples of 0.01 USD | +| `deciBps` | `uint16` | Basis points charged on token transfers, multiples of 0.1bps, or 1e-5 | +| `destGasOverhead` | `uint32` | Gas charged to execute the token transfer on the destination chain | +| `destBytesOverhead` | `uint32` | Data availability bytes returned from source pool, must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES | +| `isEnabled` | `bool` | Whether this token has custom transfer fees | + +### DestChainConfig + +Structure containing all configuration for a destination chain. + +```solidity +struct DestChainConfig { + bool isEnabled; + uint16 maxNumberOfTokensPerMsg; + uint32 maxDataBytes; + uint32 maxPerMsgGasLimit; + uint32 destGasOverhead; + uint8 destGasPerPayloadByteBase; + uint8 destGasPerPayloadByteHigh; + uint16 destGasPerPayloadByteThreshold; + uint32 destDataAvailabilityOverheadGas; + uint16 destGasPerDataAvailabilityByte; + uint16 destDataAvailabilityMultiplierBps; + bytes4 chainFamilySelector; + bool enforceOutOfOrder; + uint16 defaultTokenFeeUSDCents; + uint32 defaultTokenDestGasOverhead; + uint32 defaultTxGasLimit; + uint64 gasMultiplierWeiPerEth; + uint32 gasPriceStalenessThreshold; + uint32 networkFeeUSDCents; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `isEnabled` | `bool` | Whether this destination chain is enabled | +| `maxNumberOfTokensPerMsg` | `uint16` | Maximum number of distinct ERC20 tokens transferred per message | +| `maxDataBytes` | `uint32` | Maximum data payload size in bytes | +| `maxPerMsgGasLimit` | `uint32` | Maximum gas limit for messages targeting EVMs | +| `destGasOverhead` | `uint32` | Gas charged on top of the gasLimit to cover destination chain costs | +| `destGasPerPayloadByteBase` | `uint8` | Default dest-chain gas charged per byte of `data` payload | +| `destGasPerPayloadByteHigh` | `uint8` | High dest-chain gas charged per byte of `data` payload (for EIP-7623) | +| `destGasPerPayloadByteThreshold` | `uint16` | The value at which billing switches from base to high rate | +| `destDataAvailabilityOverheadGas` | `uint32` | Data availability gas charged for overhead costs (e.g., OCR) | +| `destGasPerDataAvailabilityByte` | `uint16` | Gas units charged per byte of message data requiring availability | +| `destDataAvailabilityMultiplierBps` | `uint16` | Multiplier for data availability gas, multiples of bps (0.0001) | +| `chainFamilySelector` | `bytes4` | Selector identifying the destination chain's family (see [`Internal` library](/ccip/api-reference/evm/v1.6.0/internal#chain_family_selector_evm)) | +| `enforceOutOfOrder` | `bool` | Whether to enforce allowOutOfOrderExecution extraArg to be true | +| `defaultTokenFeeUSDCents` | `uint16` | Default token fee charged per token transfer | +| `defaultTokenDestGasOverhead` | `uint32` | Default gas charged to execute a token transfer on the destination chain | +| `defaultTxGasLimit` | `uint32` | Default gas limit for a tx | +| `gasMultiplierWeiPerEth` | `uint64` | Multiplier for gas costs, 1e18 based (e.g., 11e17 = 10% extra cost) | +| `gasPriceStalenessThreshold` | `uint32` | Time in seconds a gas price can be stale before invalid (0 means disabled) | +| `networkFeeUSDCents` | `uint32` | Flat network fee to charge for messages, multiples of 0.01 USD | + +### StaticConfig + +Structure containing the static configuration of the FeeQuoter contract. + +```solidity +struct StaticConfig { + uint96 maxFeeJuelsPerMsg; + address linkToken; + uint32 tokenPriceStalenessThreshold; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------------ | --------- | --------------------------------------------------------- | +| `maxFeeJuelsPerMsg` | `uint96` | Maximum fee that can be charged for a message | +| `linkToken` | `address` | LINK token address | +| `tokenPriceStalenessThreshold` | `uint32` | Time in seconds a token price can be stale before invalid | + +## State Variables + +### FEE_BASE_DECIMALS + +```solidity +uint256 public constant FEE_BASE_DECIMALS = 36; +``` + + + +### typeAndVersion + +```solidity +string public constant typeAndVersion = "FeeQuoter 1.6.0"; +``` + + + +## Functions + +### convertTokenAmount + +Converts a token amount from the token's decimals to a fee-denominated amount. + +```solidity +function convertTokenAmount( + address fromToken, + uint256 fromTokenAmount, + address toToken +) external view returns (uint256); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------------- | --------- | ---------------------------------- | +| `fromToken` | `address` | The token to convert from | +| `fromTokenAmount` | `uint256` | The amount of fromToken to convert | +| `toToken` | `address` | The token to convert to | + +**Returns** + +| Type | Description | +| --------- | -------------------------------- | +| `uint256` | The equivalent amount in toToken | + +### getFeeTokens + +Returns the list of tokens that can be used to pay fees. + +```solidity +function getFeeTokens() external view returns (address[] memory); +``` + +**Returns** + +| Type | Description | +| ----------- | ---------------------------- | +| `address[]` | Array of fee token addresses | + +### getValidatedFee + +Calculates and validates the fee for a CCIP message. + +```solidity +function getValidatedFee( + uint64 destChainSelector, + Client.EVM2AnyMessage calldata message +) external view returns (uint256); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | ----------------------- | ------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `message` | `Client.EVM2AnyMessage` | The CCIP message to calculate fee for | + +**Returns** + +| Type | Description | +| --------- | --------------------------------------------------- | +| `uint256` | The total fee in the smallest unit of the fee token | + +### getTokenTransferFeeConfig + +Returns the token transfer fee configuration for a specific token and destination chain. + +```solidity +function getTokenTransferFeeConfig( + uint64 destChainSelector, + address token +) external view returns (TokenTransferFeeConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ------------------------------ | +| `destChainSelector` | `uint64` | The destination chain selector | +| `token` | `address` | The token address | + +**Returns** + +| Type | Description | +| --------------------------------------------------- | ------------------------------------ | +| [`TokenTransferFeeConfig`](#tokentransferfeeconfig) | The token transfer fee configuration | + +### getDestChainConfig + +Returns the destination chain configuration for a given chain selector. + +```solidity +function getDestChainConfig( + uint64 destChainSelector +) external view returns (DestChainConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | ------------------------------ | +| `destChainSelector` | `uint64` | The destination chain selector | + +**Returns** + +| Type | Description | +| ------------------------------------- | ----------------------------------- | +| [`DestChainConfig`](#destchainconfig) | The destination chain configuration | + +### getStaticConfig + +Returns the static configuration of the FeeQuoter contract. + +```solidity +function getStaticConfig() external view returns (StaticConfig memory); +``` + + + +**Returns** + +| Type | Description | +| ------------------------------- | ------------------------ | +| [`StaticConfig`](#staticconfig) | The static configuration | diff --git a/src/content/ccip/api-reference/evm/v1.6.0/internal.mdx b/src/content/ccip/api-reference/evm/v1.6.0/internal.mdx new file mode 100644 index 00000000000..0ee7b3be000 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.0/internal.mdx @@ -0,0 +1,187 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.0 Internal Library API Reference" +metadata: + version: "1.6.0" + description: "CCIP v1.6.0 Internal Library API Reference" + linkToWallet: false + image: "/files/930cbb7-link-symbol.svg" + datePublished: "2025-10-15T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## Internal + +A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.0/chains/evm/contracts/libraries/Internal.sol) + +## Enums + +### MessageExecutionState + +Enum listing the possible message execution states within the offRamp contract. + +```solidity +enum MessageExecutionState { + UNTOUCHED, + IN_PROGRESS, + SUCCESS, + FAILURE +} +``` + + + +## Structs + +### RampMessageHeader + +Structure representing a family-agnostic header for OnRamp and OffRamp messages. + +```solidity +struct RampMessageHeader { + bytes32 messageId; + uint64 sourceChainSelector; + uint64 destChainSelector; + uint64 sequenceNumber; + uint64 nonce; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | --------------------------------------------------------------- | +| `messageId` | `bytes32` | Unique identifier generated with source chain's encoding scheme | +| `sourceChainSelector` | `uint64` | CCIP chain selector of the source chain (not chainId) | +| `destChainSelector` | `uint64` | CCIP chain selector of the destination chain (not chainId) | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across senders/lanes | + +### EVM2AnyTokenTransfer + +Structure representing token transfers from EVM chains to any destination chain. + +```solidity +struct EVM2AnyTokenTransfer { + address sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint256 amount; + bytes destExecData; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ----------------------------------------------------------- | +| `sourcePoolAddress` | `address` | Source pool EVM address (trusted) | +| `destTokenAddress` | `bytes` | EVM address of the destination token (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | +| `destExecData` | `bytes` | Destination chain execution data (e.g., gas for EVM chains) | + +### EVM2AnyRampMessage + +Structure representing a family-agnostic message emitted from the OnRamp. + +```solidity +struct EVM2AnyRampMessage { + RampMessageHeader header; + address sender; + bytes data; + bytes receiver; + bytes extraArgs; + address feeToken; + uint256 feeTokenAmount; + uint256 feeValueJuels; + EVM2AnyTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------- | ------------------------------------------------- | -------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `address` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `bytes` | Receiver address on the destination chain | +| `extraArgs` | `bytes` | Destination-chain specific args (e.g., gasLimit for EVM) | +| `feeToken` | `address` | Token used to pay fees | +| `feeTokenAmount` | `uint256` | Amount of fee token paid | +| `feeValueJuels` | `uint256` | Fee amount denominated in Juels | +| `tokenAmounts` | [`EVM2AnyTokenTransfer[]`](#evm2anytokentransfer) | Array of tokens and amounts to transfer | + +## State Variables + +### CHAIN_FAMILY_SELECTOR_EVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c; +``` + + + +### CHAIN_FAMILY_SELECTOR_SVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SVM = 0x1e10bdc4; +``` + + + +### CHAIN_FAMILY_SELECTOR_APTOS + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_APTOS = 0xac77ffec; +``` + + + +### CHAIN_FAMILY_SELECTOR_SUI + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SUI = 0xc4e05953; +``` + + diff --git a/src/content/ccip/api-reference/evm/v1.6.1/events.mdx b/src/content/ccip/api-reference/evm/v1.6.1/events.mdx index e9343292203..7f7a85d82a8 100644 --- a/src/content/ccip/api-reference/evm/v1.6.1/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.1/events.mdx @@ -14,30 +14,30 @@ import { Aside, CopyText } from "@components" When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.1/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. -## ccipSend Events +## `ccipSend` These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.1/i-router-client#ccipsend). -### OnRamp Events +### OnRamp -### Token Pool Events (Send) +### Token Pool (Send) -## ccipReceive Events +## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. -### OffRamp Events +### OffRamp -### Router Events +### Router -### Token Pool Events (Receive) +### Token Pool (Receive) diff --git a/src/content/ccip/api-reference/evm/v1.6.1/fee-quoter.mdx b/src/content/ccip/api-reference/evm/v1.6.1/fee-quoter.mdx new file mode 100644 index 00000000000..f0a23b287e7 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.1/fee-quoter.mdx @@ -0,0 +1,536 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.1 FeeQuoter API Reference" +metadata: + version: "1.6.1" + description: "CCIP v1.6.1 FeeQuoter API Reference" + linkToWallet: false + image: "/files/930cbb7-link-symbol.svg" + datePublished: "2025-11-01T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## FeeQuoter + +The FeeQuoter contract stores gas and token prices in USD, manages chain-specific fee calculations, and provides fee estimation for cross-chain messages. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.1/chains/evm/contracts/FeeQuoter.sol) + +## Errors + +### TokenNotSupported + +```solidity +error TokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | ----------------------------- | +| `token` | `address` | The unsupported token address | + +### FeeTokenNotSupported + +```solidity +error FeeTokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | --------------------------------- | +| `token` | `address` | The unsupported fee token address | + +### StaleGasPrice + +```solidity +error StaleGasPrice(uint64 destChainSelector, uint256 threshold, uint256 timePassed); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `threshold` | `uint256` | The staleness threshold in seconds | +| `timePassed` | `uint256` | The time passed since last update in seconds | + +### MessageGasLimitTooHigh + +```solidity +error MessageGasLimitTooHigh(); +``` + + + +### MessageComputeUnitLimitTooHigh + +```solidity +error MessageComputeUnitLimitTooHigh(); +``` + + + +### DestinationChainNotEnabled + +```solidity +error DestinationChainNotEnabled(uint64 destChainSelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | --------------------------------------- | +| `destChainSelector` | `uint64` | The disabled destination chain selector | + +### ExtraArgOutOfOrderExecutionMustBeTrue + +```solidity +error ExtraArgOutOfOrderExecutionMustBeTrue(); +``` + + + +### InvalidExtraArgsTag + +```solidity +error InvalidExtraArgsTag(); +``` + + + +### InvalidExtraArgsData + +```solidity +error InvalidExtraArgsData(); +``` + + + +### MessageTooLarge + +```solidity +error MessageTooLarge(uint256 maxSize, uint256 actualSize); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------ | --------- | -------------------------------------- | +| `maxSize` | `uint256` | Maximum allowed message size | +| `actualSize` | `uint256` | Actual message size that was too large | + +### UnsupportedNumberOfTokens + +```solidity +error UnsupportedNumberOfTokens(uint256 numberOfTokens, uint256 maxNumberOfTokensPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | -------------------------------------------- | +| `numberOfTokens` | `uint256` | Number of tokens in the message | +| `maxNumberOfTokensPerMsg` | `uint256` | Maximum allowed number of tokens per message | + +### MessageFeeTooHigh + +```solidity +error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ---------------------------------------- | +| `msgFeeJuels` | `uint256` | Calculated message fee in Juels | +| `maxFeeJuelsPerMsg` | `uint256` | Maximum allowed fee in Juels per message | + +### InvalidTokenReceiver + +```solidity +error InvalidTokenReceiver(); +``` + + + +### TooManySVMExtraArgsAccounts + +```solidity +error TooManySVMExtraArgsAccounts(uint256 numAccounts, uint256 maxAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------- | --------- | ---------------------------------- | +| `numAccounts` | `uint256` | Number of accounts provided | +| `maxAccounts` | `uint256` | Maximum allowed number of accounts | + +### InvalidSVMExtraArgsWritableBitmap + +```solidity +error InvalidSVMExtraArgsWritableBitmap(uint64 accountIsWritableBitmap, uint256 numAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | ------------------------------------ | +| `accountIsWritableBitmap` | `uint64` | The provided writable bitmap | +| `numAccounts` | `uint256` | Number of accounts in the extra args | + +### TooManySuiExtraArgsReceiverObjectIds + +```solidity +error TooManySuiExtraArgsReceiverObjectIds(uint256 numReceiverObjectIds, uint256 maxReceiverObjectIds); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------------- | --------- | --------------------------------------------- | +| `numReceiverObjectIds` | `uint256` | Number of receiver object IDs provided | +| `maxReceiverObjectIds` | `uint256` | Maximum allowed number of receiver object IDs | + +### InvalidChainFamilySelector + +```solidity +error InvalidChainFamilySelector(bytes4 chainFamilySelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| --------------------- | -------- | --------------------------------- | +| `chainFamilySelector` | `bytes4` | The invalid chain family selector | + +## Structs + +### TokenTransferFeeConfig + +Structure defining the fee configuration for token transfers. + +```solidity +struct TokenTransferFeeConfig { + uint32 minFeeUSDCents; + uint32 maxFeeUSDCents; + uint16 deciBps; + uint32 destGasOverhead; + uint32 destBytesOverhead; + bool isEnabled; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ------------------------------------------------------------------------------------------------- | +| `minFeeUSDCents` | `uint32` | Minimum fee to charge per token transfer, multiples of 0.01 USD | +| `maxFeeUSDCents` | `uint32` | Maximum fee to charge per token transfer, multiples of 0.01 USD | +| `deciBps` | `uint16` | Basis points charged on token transfers, multiples of 0.1bps, or 1e-5 | +| `destGasOverhead` | `uint32` | Gas charged to execute the token transfer on the destination chain | +| `destBytesOverhead` | `uint32` | Data availability bytes returned from source pool, must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES | +| `isEnabled` | `bool` | Whether this token has custom transfer fees | + +### DestChainConfig + +Structure containing all configuration for a destination chain. + +```solidity +struct DestChainConfig { + bool isEnabled; + uint16 maxNumberOfTokensPerMsg; + uint32 maxDataBytes; + uint32 maxPerMsgGasLimit; + uint32 destGasOverhead; + uint8 destGasPerPayloadByteBase; + uint8 destGasPerPayloadByteHigh; + uint16 destGasPerPayloadByteThreshold; + uint32 destDataAvailabilityOverheadGas; + uint16 destGasPerDataAvailabilityByte; + uint16 destDataAvailabilityMultiplierBps; + bytes4 chainFamilySelector; + bool enforceOutOfOrder; + uint16 defaultTokenFeeUSDCents; + uint32 defaultTokenDestGasOverhead; + uint32 defaultTxGasLimit; + uint64 gasMultiplierWeiPerEth; + uint32 gasPriceStalenessThreshold; + uint32 networkFeeUSDCents; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `isEnabled` | `bool` | Whether this destination chain is enabled | +| `maxNumberOfTokensPerMsg` | `uint16` | Maximum number of distinct ERC20 tokens transferred per message | +| `maxDataBytes` | `uint32` | Maximum data payload size in bytes | +| `maxPerMsgGasLimit` | `uint32` | Maximum gas limit for messages targeting EVMs | +| `destGasOverhead` | `uint32` | Gas charged on top of the gasLimit to cover destination chain costs | +| `destGasPerPayloadByteBase` | `uint8` | Default dest-chain gas charged per byte of `data` payload | +| `destGasPerPayloadByteHigh` | `uint8` | High dest-chain gas charged per byte of `data` payload (for EIP-7623) | +| `destGasPerPayloadByteThreshold` | `uint16` | The value at which billing switches from base to high rate | +| `destDataAvailabilityOverheadGas` | `uint32` | Data availability gas charged for overhead costs (e.g., OCR) | +| `destGasPerDataAvailabilityByte` | `uint16` | Gas units charged per byte of message data requiring availability | +| `destDataAvailabilityMultiplierBps` | `uint16` | Multiplier for data availability gas, multiples of bps (0.0001) | +| `chainFamilySelector` | `bytes4` | Selector identifying the destination chain's family (see [`Internal` library](/ccip/api-reference/evm/v1.6.1/internal#chain_family_selector_evm)) | +| `enforceOutOfOrder` | `bool` | Whether to enforce allowOutOfOrderExecution extraArg to be true | +| `defaultTokenFeeUSDCents` | `uint16` | Default token fee charged per token transfer | +| `defaultTokenDestGasOverhead` | `uint32` | Default gas charged to execute a token transfer on the destination chain | +| `defaultTxGasLimit` | `uint32` | Default gas limit for a tx | +| `gasMultiplierWeiPerEth` | `uint64` | Multiplier for gas costs, 1e18 based (e.g., 11e17 = 10% extra cost) | +| `gasPriceStalenessThreshold` | `uint32` | Time in seconds a gas price can be stale before invalid (0 means disabled) | +| `networkFeeUSDCents` | `uint32` | Flat network fee to charge for messages, multiples of 0.01 USD | + +### StaticConfig + +Structure containing the static configuration of the FeeQuoter contract. + +```solidity +struct StaticConfig { + uint96 maxFeeJuelsPerMsg; + address linkToken; + uint32 tokenPriceStalenessThreshold; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------------ | --------- | --------------------------------------------------------- | +| `maxFeeJuelsPerMsg` | `uint96` | Maximum fee that can be charged for a message | +| `linkToken` | `address` | LINK token address | +| `tokenPriceStalenessThreshold` | `uint32` | Time in seconds a token price can be stale before invalid | + +## State Variables + +### FEE_BASE_DECIMALS + +```solidity +uint256 public constant FEE_BASE_DECIMALS = 36; +``` + + + +### typeAndVersion + +```solidity +string public constant typeAndVersion = "FeeQuoter 1.6.1"; +``` + + + +## Functions + +### convertTokenAmount + +Converts a token amount from the token's decimals to a fee-denominated amount. + +```solidity +function convertTokenAmount( + address fromToken, + uint256 fromTokenAmount, + address toToken +) external view returns (uint256); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------------- | --------- | ---------------------------------- | +| `fromToken` | `address` | The token to convert from | +| `fromTokenAmount` | `uint256` | The amount of fromToken to convert | +| `toToken` | `address` | The token to convert to | + +**Returns** + +| Type | Description | +| --------- | -------------------------------- | +| `uint256` | The equivalent amount in toToken | + +### getFeeTokens + +Returns the list of tokens that can be used to pay fees. + +```solidity +function getFeeTokens() external view returns (address[] memory); +``` + +**Returns** + +| Type | Description | +| ----------- | ---------------------------- | +| `address[]` | Array of fee token addresses | + +### getValidatedFee + +Calculates and validates the fee for a CCIP message. + +```solidity +function getValidatedFee( + uint64 destChainSelector, + Client.EVM2AnyMessage calldata message +) external view returns (uint256); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | ----------------------- | ------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `message` | `Client.EVM2AnyMessage` | The CCIP message to calculate fee for | + +**Returns** + +| Type | Description | +| --------- | --------------------------------------------------- | +| `uint256` | The total fee in the smallest unit of the fee token | + +### getTokenTransferFeeConfig + +Returns the token transfer fee configuration for a specific token and destination chain. + +```solidity +function getTokenTransferFeeConfig( + uint64 destChainSelector, + address token +) external view returns (TokenTransferFeeConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ------------------------------ | +| `destChainSelector` | `uint64` | The destination chain selector | +| `token` | `address` | The token address | + +**Returns** + +| Type | Description | +| --------------------------------------------------- | ------------------------------------ | +| [`TokenTransferFeeConfig`](#tokentransferfeeconfig) | The token transfer fee configuration | + +### getDestChainConfig + +Returns the destination chain configuration for a given chain selector. + +```solidity +function getDestChainConfig( + uint64 destChainSelector +) external view returns (DestChainConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | ------------------------------ | +| `destChainSelector` | `uint64` | The destination chain selector | + +**Returns** + +| Type | Description | +| ------------------------------------- | ----------------------------------- | +| [`DestChainConfig`](#destchainconfig) | The destination chain configuration | + +### getStaticConfig + +Returns the static configuration of the FeeQuoter contract. + +```solidity +function getStaticConfig() external view returns (StaticConfig memory); +``` + + + +**Returns** + +| Type | Description | +| ------------------------------- | ------------------------ | +| [`StaticConfig`](#staticconfig) | The static configuration | diff --git a/src/content/ccip/api-reference/evm/v1.6.1/internal.mdx b/src/content/ccip/api-reference/evm/v1.6.1/internal.mdx new file mode 100644 index 00000000000..9f4dc4a63e6 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.1/internal.mdx @@ -0,0 +1,195 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.1 Internal Library API Reference" +metadata: + version: "1.6.1" + description: "CCIP v1.6.1 Internal Library API Reference" + linkToWallet: false + image: "/files/930cbb7-link-symbol.svg" + datePublished: "2025-11-01T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## Internal + +A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.1/chains/evm/contracts/libraries/Internal.sol) + +## Enums + +### MessageExecutionState + +Enum listing the possible message execution states within the offRamp contract. + +```solidity +enum MessageExecutionState { + UNTOUCHED, + IN_PROGRESS, + SUCCESS, + FAILURE +} +``` + + + +## Structs + +### RampMessageHeader + +Structure representing a family-agnostic header for OnRamp and OffRamp messages. + +```solidity +struct RampMessageHeader { + bytes32 messageId; + uint64 sourceChainSelector; + uint64 destChainSelector; + uint64 sequenceNumber; + uint64 nonce; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | --------------------------------------------------------------- | +| `messageId` | `bytes32` | Unique identifier generated with source chain's encoding scheme | +| `sourceChainSelector` | `uint64` | CCIP chain selector of the source chain (not chainId) | +| `destChainSelector` | `uint64` | CCIP chain selector of the destination chain (not chainId) | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across senders/lanes | + +### EVM2AnyTokenTransfer + +Structure representing token transfers from EVM chains to any destination chain. + +```solidity +struct EVM2AnyTokenTransfer { + address sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint256 amount; + bytes destExecData; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ----------------------------------------------------------- | +| `sourcePoolAddress` | `address` | Source pool EVM address (trusted) | +| `destTokenAddress` | `bytes` | EVM address of the destination token (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | +| `destExecData` | `bytes` | Destination chain execution data (e.g., gas for EVM chains) | + +### EVM2AnyRampMessage + +Structure representing a family-agnostic message emitted from the OnRamp. + +```solidity +struct EVM2AnyRampMessage { + RampMessageHeader header; + address sender; + bytes data; + bytes receiver; + bytes extraArgs; + address feeToken; + uint256 feeTokenAmount; + uint256 feeValueJuels; + EVM2AnyTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------- | ------------------------------------------------- | -------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `address` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `bytes` | Receiver address on the destination chain | +| `extraArgs` | `bytes` | Destination-chain specific args (e.g., gasLimit for EVM) | +| `feeToken` | `address` | Token used to pay fees | +| `feeTokenAmount` | `uint256` | Amount of fee token paid | +| `feeValueJuels` | `uint256` | Fee amount denominated in Juels | +| `tokenAmounts` | [`EVM2AnyTokenTransfer[]`](#evm2anytokentransfer) | Array of tokens and amounts to transfer | + +## State Variables + +### CHAIN_FAMILY_SELECTOR_EVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c; +``` + + + +### CHAIN_FAMILY_SELECTOR_SVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SVM = 0x1e10bdc4; +``` + + + +### CHAIN_FAMILY_SELECTOR_APTOS + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_APTOS = 0xac77ffec; +``` + + + +### CHAIN_FAMILY_SELECTOR_SUI + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SUI = 0xc4e05953; +``` + + + +### CHAIN_FAMILY_SELECTOR_TVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_TVM = 0x647e2ba9; +``` + + diff --git a/src/content/ccip/api-reference/evm/v1.6.2/events.mdx b/src/content/ccip/api-reference/evm/v1.6.2/events.mdx index 0d5a0aa00a1..e2fe31ad8dd 100644 --- a/src/content/ccip/api-reference/evm/v1.6.2/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.2/events.mdx @@ -14,30 +14,30 @@ import { Aside, CopyText } from "@components" When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.2/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. -## ccipSend Events +## `ccipSend` These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.2/i-router-client#ccipsend). -### OnRamp Events +### OnRamp -### Token Pool Events (Send) +### Token Pool (Send) -## ccipReceive Events +## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. -### OffRamp Events +### OffRamp -### Router Events +### Router -### Token Pool Events (Receive) +### Token Pool (Receive) diff --git a/src/content/ccip/api-reference/evm/v1.6.2/fee-quoter.mdx b/src/content/ccip/api-reference/evm/v1.6.2/fee-quoter.mdx new file mode 100644 index 00000000000..6c56a672d89 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.2/fee-quoter.mdx @@ -0,0 +1,518 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.2 FeeQuoter API Reference" +metadata: + description: "Complete API documentation for the FeeQuoter contract in Chainlink CCIP v1.6.2. Fee calculation, token pricing, and destination chain configuration for cross-chain messages." + excerpt: "ccip feequoter api reference v1.6.2 fee calculation token pricing gas prices destination chain configuration" + version: "1.6.2" + datePublished: "2025-11-05T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## FeeQuoter + +The FeeQuoter contract stores gas and token prices in USD, manages chain-specific fee calculations, and provides fee estimation for cross-chain messages. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.2/chains/evm/contracts/FeeQuoter.sol) + +## Errors + +### TokenNotSupported + +```solidity +error TokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | ----------------------------- | +| `token` | `address` | The unsupported token address | + +### FeeTokenNotSupported + +```solidity +error FeeTokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | --------------------------------- | +| `token` | `address` | The unsupported fee token address | + +### StaleGasPrice + +```solidity +error StaleGasPrice(uint64 destChainSelector, uint256 threshold, uint256 timePassed); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `threshold` | `uint256` | The staleness threshold in seconds | +| `timePassed` | `uint256` | The time passed since last update in seconds | + +### MessageGasLimitTooHigh + +```solidity +error MessageGasLimitTooHigh(); +``` + + + +### MessageComputeUnitLimitTooHigh + +```solidity +error MessageComputeUnitLimitTooHigh(); +``` + + + +### DestinationChainNotEnabled + +```solidity +error DestinationChainNotEnabled(uint64 destChainSelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | --------------------------------------- | +| `destChainSelector` | `uint64` | The disabled destination chain selector | + +### ExtraArgOutOfOrderExecutionMustBeTrue + +```solidity +error ExtraArgOutOfOrderExecutionMustBeTrue(); +``` + + + +### InvalidExtraArgsTag + +```solidity +error InvalidExtraArgsTag(); +``` + + + +### InvalidExtraArgsData + +```solidity +error InvalidExtraArgsData(); +``` + + + +### MessageTooLarge + +```solidity +error MessageTooLarge(uint256 maxSize, uint256 actualSize); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------ | --------- | -------------------------------------- | +| `maxSize` | `uint256` | Maximum allowed message size | +| `actualSize` | `uint256` | Actual message size that was too large | + +### UnsupportedNumberOfTokens + +```solidity +error UnsupportedNumberOfTokens(uint256 numberOfTokens, uint256 maxNumberOfTokensPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | -------------------------------------------- | +| `numberOfTokens` | `uint256` | Number of tokens in the message | +| `maxNumberOfTokensPerMsg` | `uint256` | Maximum allowed number of tokens per message | + +### MessageFeeTooHigh + +```solidity +error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ---------------------------------------- | +| `msgFeeJuels` | `uint256` | Calculated message fee in Juels | +| `maxFeeJuelsPerMsg` | `uint256` | Maximum allowed fee in Juels per message | + +### InvalidTokenReceiver + +```solidity +error InvalidTokenReceiver(); +``` + + + +### TooManySVMExtraArgsAccounts + +```solidity +error TooManySVMExtraArgsAccounts(uint256 numAccounts, uint256 maxAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------- | --------- | ---------------------------------- | +| `numAccounts` | `uint256` | Number of accounts provided | +| `maxAccounts` | `uint256` | Maximum allowed number of accounts | + +### InvalidSVMExtraArgsWritableBitmap + +```solidity +error InvalidSVMExtraArgsWritableBitmap(uint64 accountIsWritableBitmap, uint256 numAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | ------------------------------------ | +| `accountIsWritableBitmap` | `uint64` | The provided writable bitmap | +| `numAccounts` | `uint256` | Number of accounts in the extra args | + +### TooManySuiExtraArgsReceiverObjectIds + +```solidity +error TooManySuiExtraArgsReceiverObjectIds(uint256 numReceiverObjectIds, uint256 maxReceiverObjectIds); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------------- | --------- | --------------------------------------------- | +| `numReceiverObjectIds` | `uint256` | Number of receiver object IDs provided | +| `maxReceiverObjectIds` | `uint256` | Maximum allowed number of receiver object IDs | + +### InvalidChainFamilySelector + +```solidity +error InvalidChainFamilySelector(bytes4 chainFamilySelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| --------------------- | -------- | --------------------------------- | +| `chainFamilySelector` | `bytes4` | The invalid chain family selector | + +## Structs + +### TokenTransferFeeConfig + +Structure representing the token transfer fee configuration for a specific token on a destination chain. + +```solidity +struct TokenTransferFeeConfig { + uint32 minFeeUSDCents; + uint32 maxFeeUSDCents; + uint16 deciBps; + uint32 destGasOverhead; + uint32 destBytesOverhead; + bool isEnabled; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ---------------------------------------------------------------------------- | +| `minFeeUSDCents` | `uint32` | Minimum fee per token transfer in USD cents (multiples of 0.01 USD) | +| `maxFeeUSDCents` | `uint32` | Maximum fee per token transfer in USD cents (multiples of 0.01 USD) | +| `deciBps` | `uint16` | Basis points charged on token transfers (multiples of 0.1bps, or 1e-5) | +| `destGasOverhead` | `uint32` | Gas charged to execute the token transfer on destination chain | +| `destBytesOverhead` | `uint32` | Data availability bytes overhead, must be ≥ `CCIP_LOCK_OR_BURN_V1_RET_BYTES` | +| `isEnabled` | `bool` | Whether this token has custom transfer fees | + +### DestChainConfig + +Structure containing fee and validation configuration for a destination chain. + +```solidity +struct DestChainConfig { + bool isEnabled; + uint16 maxNumberOfTokensPerMsg; + uint32 maxDataBytes; + uint32 maxPerMsgGasLimit; + uint32 destGasOverhead; + uint8 destGasPerPayloadByteBase; + uint8 destGasPerPayloadByteHigh; + uint16 destGasPerPayloadByteThreshold; + uint32 destDataAvailabilityOverheadGas; + uint16 destGasPerDataAvailabilityByte; + uint16 destDataAvailabilityMultiplierBps; + bytes4 chainFamilySelector; + bool enforceOutOfOrder; + uint16 defaultTokenFeeUSDCents; + uint32 defaultTokenDestGasOverhead; + uint32 defaultTxGasLimit; + uint64 gasMultiplierWeiPerEth; + uint32 gasPriceStalenessThreshold; + uint32 networkFeeUSDCents; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ----------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `isEnabled` | `bool` | Whether this destination chain is enabled | +| `maxNumberOfTokensPerMsg` | `uint16` | Maximum number of distinct ERC20 tokens per message | +| `maxDataBytes` | `uint32` | Maximum data payload size in bytes | +| `maxPerMsgGasLimit` | `uint32` | Maximum gas limit for messages targeting EVMs | +| `destGasOverhead` | `uint32` | Gas charged on top of gasLimit to cover destination chain costs | +| `destGasPerPayloadByteBase` | `uint8` | Default gas charged per byte of data payload | +| `destGasPerPayloadByteHigh` | `uint8` | High gas charged per byte of data payload (for EIP-7623 compliance) | +| `destGasPerPayloadByteThreshold` | `uint16` | Threshold at which billing switches from base to high rate | +| `destDataAvailabilityOverheadGas` | `uint32` | Data availability gas charged for overhead costs (e.g., OCR) | +| `destGasPerDataAvailabilityByte` | `uint16` | Gas units charged per byte needing data availability | +| `destDataAvailabilityMultiplierBps` | `uint16` | Multiplier for data availability gas (multiples of bps, or 0.0001) | +| `chainFamilySelector` | `bytes4` | Selector identifying the destination chain's family (see [Internal](/ccip/api-reference/evm/v1.6.2/internal#state-variables)) | +| `enforceOutOfOrder` | `bool` | Whether to enforce `allowOutOfOrderExecution` extraArg to be true | +| `defaultTokenFeeUSDCents` | `uint16` | Default token fee per transfer in USD cents (multiples of 0.01 USD) | +| `defaultTokenDestGasOverhead` | `uint32` | Default gas charged for token transfers on destination chain | +| `defaultTxGasLimit` | `uint32` | Default gas limit for transactions | +| `gasMultiplierWeiPerEth` | `uint64` | Multiplier for gas costs (1e18 based, e.g., 11e17 = 10% extra cost) | +| `gasPriceStalenessThreshold` | `uint32` | Time in seconds before gas price is considered stale (0 = disabled) | +| `networkFeeUSDCents` | `uint32` | Flat network fee for messages in USD cents (multiples of 0.01 USD) | + +### StaticConfig + +Structure containing immutable FeeQuoter configuration set at deployment. + +```solidity +struct StaticConfig { + uint96 maxFeeJuelsPerMsg; + address linkToken; + uint32 tokenPriceStalenessThreshold; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------------ | --------- | -------------------------------------------------------- | +| `maxFeeJuelsPerMsg` | `uint96` | Maximum fee that can be charged for a message in Juels | +| `linkToken` | `address` | Address of the LINK token contract | +| `tokenPriceStalenessThreshold` | `uint32` | Time in seconds before a token price is considered stale | + +## State Variables + +### FEE_BASE_DECIMALS + +```solidity +uint256 public constant FEE_BASE_DECIMALS = 36; +``` + + + +### typeAndVersion + +```solidity +string public constant typeAndVersion = "FeeQuoter 1.6.2"; +``` + + + +## Functions + +### convertTokenAmount + +Converts a token amount from one token to another using current prices. + +```solidity +function convertTokenAmount(address fromToken, uint256 fromTokenAmount, address toToken) public view returns (uint256); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------------- | --------- | ---------------------- | +| `fromToken` | `address` | Source token address | +| `fromTokenAmount` | `uint256` | Amount in source token | +| `toToken` | `address` | Target token address | + +**Returns** + +| Type | Description | +| --------- | --------------------------------- | +| `uint256` | Equivalent amount in target token | + +### getFeeTokens + +Gets the list of supported fee tokens. + +```solidity +function getFeeTokens() external view returns (address[] memory); +``` + + + +**Returns** + +| Type | Description | +| ----------- | -------------------------------------- | +| `address[]` | Array of supported fee token addresses | + +### getValidatedFee + +Calculates the validated fee for sending a cross-chain message. + +```solidity +function getValidatedFee(uint64 destChainSelector, Client.EVM2AnyMessage calldata message) external view returns (uint256 feeTokenAmount); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | ----------------------- | ---------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `message` | `Client.EVM2AnyMessage` | Message to calculate fee for | + +**Returns** + +| Type | Description | +| --------- | -------------------------------------------------- | +| `uint256` | Fee amount in the message's fee token denomination | + +### getTokenTransferFeeConfig + +Gets the token transfer fee configuration for a specific token and destination chain. + +```solidity +function getTokenTransferFeeConfig(uint64 destChainSelector, address token) external view returns (TokenTransferFeeConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `token` | `address` | Token address | + +**Returns** + +| Type | Description | +| --------------------------------------------------- | ---------------------------------------------- | +| [`TokenTransferFeeConfig`](#tokentransferfeeconfig) | Token transfer fee configuration for the token | + +### getDestChainConfig + +Gets the configuration for a destination chain. + +```solidity +function getDestChainConfig(uint64 destChainSelector) external view returns (DestChainConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | -------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | + +**Returns** + +| Type | Description | +| ------------------------------------- | ------------------------------- | +| [`DestChainConfig`](#destchainconfig) | Destination chain configuration | + +### getStaticConfig + +Gets the static configuration of the FeeQuoter. + +```solidity +function getStaticConfig() external view returns (StaticConfig memory); +``` + + + +**Returns** + +| Type | Description | +| ------------------------------- | ------------------------------------------------------------- | +| [`StaticConfig`](#staticconfig) | Static configuration including max fee and LINK token address | diff --git a/src/content/ccip/api-reference/evm/v1.6.2/internal.mdx b/src/content/ccip/api-reference/evm/v1.6.2/internal.mdx new file mode 100644 index 00000000000..2fb84da4096 --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.2/internal.mdx @@ -0,0 +1,194 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.2 Internal Library API Reference" +metadata: + description: "Complete API documentation for the Internal library in Chainlink CCIP v1.6.2. Internal data structures, constants, and utilities for cross-chain message processing." + excerpt: "ccip internal library api reference v1.6.2 rampmessageheader evm2anyrampmessage any2evmrampmessage tokentransfer execution report merkle root" + version: "1.6.2" + datePublished: "2025-11-05T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## Internal + +A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.2/chains/evm/contracts/libraries/Internal.sol) + +## Enums + +### MessageExecutionState + +Enum listing the possible message execution states within the offRamp contract. + +```solidity +enum MessageExecutionState { + UNTOUCHED, + IN_PROGRESS, + SUCCESS, + FAILURE +} +``` + + + +## Structs + +### RampMessageHeader + +Structure representing a family-agnostic header for OnRamp and OffRamp messages. + +```solidity +struct RampMessageHeader { + bytes32 messageId; + uint64 sourceChainSelector; + uint64 destChainSelector; + uint64 sequenceNumber; + uint64 nonce; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | --------------------------------------------------------------- | +| `messageId` | `bytes32` | Unique identifier generated with source chain's encoding scheme | +| `sourceChainSelector` | `uint64` | CCIP chain selector of the source chain (not chainId) | +| `destChainSelector` | `uint64` | CCIP chain selector of the destination chain (not chainId) | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across senders/lanes | + +### EVM2AnyTokenTransfer + +Structure representing token transfers from EVM chains to any destination chain. + +```solidity +struct EVM2AnyTokenTransfer { + address sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint256 amount; + bytes destExecData; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ----------------------------------------------------------- | +| `sourcePoolAddress` | `address` | Source pool EVM address (trusted) | +| `destTokenAddress` | `bytes` | EVM address of the destination token (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | +| `destExecData` | `bytes` | Destination chain execution data (e.g., gas for EVM chains) | + +### EVM2AnyRampMessage + +Structure representing a family-agnostic message emitted from the OnRamp. + +```solidity +struct EVM2AnyRampMessage { + RampMessageHeader header; + address sender; + bytes data; + bytes receiver; + bytes extraArgs; + address feeToken; + uint256 feeTokenAmount; + uint256 feeValueJuels; + EVM2AnyTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------- | ------------------------------------------------- | -------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `address` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `bytes` | Receiver address on the destination chain | +| `extraArgs` | `bytes` | Destination-chain specific args (e.g., gasLimit for EVM) | +| `feeToken` | `address` | Token used to pay fees | +| `feeTokenAmount` | `uint256` | Amount of fee token paid | +| `feeValueJuels` | `uint256` | Fee amount denominated in Juels | +| `tokenAmounts` | [`EVM2AnyTokenTransfer[]`](#evm2anytokentransfer) | Array of tokens and amounts to transfer | + +## State Variables + +### CHAIN_FAMILY_SELECTOR_EVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c; +``` + + + +### CHAIN_FAMILY_SELECTOR_SVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SVM = 0x1e10bdc4; +``` + + + +### CHAIN_FAMILY_SELECTOR_APTOS + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_APTOS = 0xac77ffec; +``` + + + +### CHAIN_FAMILY_SELECTOR_SUI + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SUI = 0xc4e05953; +``` + + + +### CHAIN_FAMILY_SELECTOR_TVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_TVM = 0x647e2ba9; +``` + + diff --git a/src/content/ccip/api-reference/evm/v1.6.3/events.mdx b/src/content/ccip/api-reference/evm/v1.6.3/events.mdx index c69384cb812..979a6175f8f 100644 --- a/src/content/ccip/api-reference/evm/v1.6.3/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.3/events.mdx @@ -14,30 +14,30 @@ import { Aside, CopyText } from "@components" When invoking the `ccipSend` [function](/ccip/api-reference/evm/v1.6.3/i-router-client#ccipsend) or when a message is executed via `ccipReceive`, various events are emitted by CCIP contracts. Below is a compiled list of events you can expect during CCIP operations. -## ccipSend Events +## `ccipSend` These events are emitted when sending a cross-chain message using the `ccipSend` [function](/ccip/api-reference/evm/v1.6.3/i-router-client#ccipsend). -### OnRamp Events +### OnRamp -### Token Pool Events (Send) +### Token Pool (Send) -## ccipReceive Events +## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. -### OffRamp Events +### OffRamp -### Router Events +### Router -### Token Pool Events (Receive) +### Token Pool (Receive) diff --git a/src/content/ccip/api-reference/evm/v1.6.3/fee-quoter.mdx b/src/content/ccip/api-reference/evm/v1.6.3/fee-quoter.mdx new file mode 100644 index 00000000000..3a404567deb --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.3/fee-quoter.mdx @@ -0,0 +1,518 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.3 FeeQuoter API Reference" +metadata: + description: "Complete API documentation for the FeeQuoter contract in Chainlink CCIP v1.6.3. Fee calculation, token pricing, and destination chain configuration for cross-chain messages." + excerpt: "ccip feequoter api reference v1.6.3 fee calculation token pricing gas prices destination chain configuration" + version: "1.6.3" + datePublished: "2025-11-05T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## FeeQuoter + +The FeeQuoter contract stores gas and token prices in USD, manages chain-specific fee calculations, and provides fee estimation for cross-chain messages. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.3/chains/evm/contracts/FeeQuoter.sol) + +## Errors + +### TokenNotSupported + +```solidity +error TokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | ----------------------------- | +| `token` | `address` | The unsupported token address | + +### FeeTokenNotSupported + +```solidity +error FeeTokenNotSupported(address token); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------- | --------- | --------------------------------- | +| `token` | `address` | The unsupported fee token address | + +### StaleGasPrice + +```solidity +error StaleGasPrice(uint64 destChainSelector, uint256 threshold, uint256 timePassed); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------------------------- | +| `destChainSelector` | `uint64` | The destination chain selector | +| `threshold` | `uint256` | The staleness threshold in seconds | +| `timePassed` | `uint256` | The time passed since last update in seconds | + +### MessageGasLimitTooHigh + +```solidity +error MessageGasLimitTooHigh(); +``` + + + +### MessageComputeUnitLimitTooHigh + +```solidity +error MessageComputeUnitLimitTooHigh(); +``` + + + +### DestinationChainNotEnabled + +```solidity +error DestinationChainNotEnabled(uint64 destChainSelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | --------------------------------------- | +| `destChainSelector` | `uint64` | The disabled destination chain selector | + +### ExtraArgOutOfOrderExecutionMustBeTrue + +```solidity +error ExtraArgOutOfOrderExecutionMustBeTrue(); +``` + + + +### InvalidExtraArgsTag + +```solidity +error InvalidExtraArgsTag(); +``` + + + +### InvalidExtraArgsData + +```solidity +error InvalidExtraArgsData(); +``` + + + +### MessageTooLarge + +```solidity +error MessageTooLarge(uint256 maxSize, uint256 actualSize); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------ | --------- | -------------------------------------- | +| `maxSize` | `uint256` | Maximum allowed message size | +| `actualSize` | `uint256` | Actual message size that was too large | + +### UnsupportedNumberOfTokens + +```solidity +error UnsupportedNumberOfTokens(uint256 numberOfTokens, uint256 maxNumberOfTokensPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | -------------------------------------------- | +| `numberOfTokens` | `uint256` | Number of tokens in the message | +| `maxNumberOfTokensPerMsg` | `uint256` | Maximum allowed number of tokens per message | + +### MessageFeeTooHigh + +```solidity +error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | ---------------------------------------- | +| `msgFeeJuels` | `uint256` | Calculated message fee in Juels | +| `maxFeeJuelsPerMsg` | `uint256` | Maximum allowed fee in Juels per message | + +### InvalidTokenReceiver + +```solidity +error InvalidTokenReceiver(); +``` + + + +### TooManySVMExtraArgsAccounts + +```solidity +error TooManySVMExtraArgsAccounts(uint256 numAccounts, uint256 maxAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------- | --------- | ---------------------------------- | +| `numAccounts` | `uint256` | Number of accounts provided | +| `maxAccounts` | `uint256` | Maximum allowed number of accounts | + +### InvalidSVMExtraArgsWritableBitmap + +```solidity +error InvalidSVMExtraArgsWritableBitmap(uint64 accountIsWritableBitmap, uint256 numAccounts); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------------- | --------- | ------------------------------------ | +| `accountIsWritableBitmap` | `uint64` | The provided writable bitmap | +| `numAccounts` | `uint256` | Number of accounts in the extra args | + +### TooManySuiExtraArgsReceiverObjectIds + +```solidity +error TooManySuiExtraArgsReceiverObjectIds(uint256 numReceiverObjectIds, uint256 maxReceiverObjectIds); +``` + + + +**Parameters** + +| Name | Type | Description | +| ---------------------- | --------- | --------------------------------------------- | +| `numReceiverObjectIds` | `uint256` | Number of receiver object IDs provided | +| `maxReceiverObjectIds` | `uint256` | Maximum allowed number of receiver object IDs | + +### InvalidChainFamilySelector + +```solidity +error InvalidChainFamilySelector(bytes4 chainFamilySelector); +``` + + + +**Parameters** + +| Name | Type | Description | +| --------------------- | -------- | --------------------------------- | +| `chainFamilySelector` | `bytes4` | The invalid chain family selector | + +## Structs + +### TokenTransferFeeConfig + +Structure representing the token transfer fee configuration for a specific token on a destination chain. + +```solidity +struct TokenTransferFeeConfig { + uint32 minFeeUSDCents; + uint32 maxFeeUSDCents; + uint16 deciBps; + uint32 destGasOverhead; + uint32 destBytesOverhead; + bool isEnabled; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | -------- | ---------------------------------------------------------------------------- | +| `minFeeUSDCents` | `uint32` | Minimum fee per token transfer in USD cents (multiples of 0.01 USD) | +| `maxFeeUSDCents` | `uint32` | Maximum fee per token transfer in USD cents (multiples of 0.01 USD) | +| `deciBps` | `uint16` | Basis points charged on token transfers (multiples of 0.1bps, or 1e-5) | +| `destGasOverhead` | `uint32` | Gas charged to execute the token transfer on destination chain | +| `destBytesOverhead` | `uint32` | Data availability bytes overhead, must be ≥ `CCIP_LOCK_OR_BURN_V1_RET_BYTES` | +| `isEnabled` | `bool` | Whether this token has custom transfer fees | + +### DestChainConfig + +Structure containing fee and validation configuration for a destination chain. + +```solidity +struct DestChainConfig { + bool isEnabled; + uint16 maxNumberOfTokensPerMsg; + uint32 maxDataBytes; + uint32 maxPerMsgGasLimit; + uint32 destGasOverhead; + uint8 destGasPerPayloadByteBase; + uint8 destGasPerPayloadByteHigh; + uint16 destGasPerPayloadByteThreshold; + uint32 destDataAvailabilityOverheadGas; + uint16 destGasPerDataAvailabilityByte; + uint16 destDataAvailabilityMultiplierBps; + bytes4 chainFamilySelector; + bool enforceOutOfOrder; + uint16 defaultTokenFeeUSDCents; + uint32 defaultTokenDestGasOverhead; + uint32 defaultTxGasLimit; + uint64 gasMultiplierWeiPerEth; + uint32 gasPriceStalenessThreshold; + uint32 networkFeeUSDCents; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ----------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `isEnabled` | `bool` | Whether this destination chain is enabled | +| `maxNumberOfTokensPerMsg` | `uint16` | Maximum number of distinct ERC20 tokens per message | +| `maxDataBytes` | `uint32` | Maximum data payload size in bytes | +| `maxPerMsgGasLimit` | `uint32` | Maximum gas limit for messages targeting EVMs | +| `destGasOverhead` | `uint32` | Gas charged on top of gasLimit to cover destination chain costs | +| `destGasPerPayloadByteBase` | `uint8` | Default gas charged per byte of data payload | +| `destGasPerPayloadByteHigh` | `uint8` | High gas charged per byte of data payload (for EIP-7623 compliance) | +| `destGasPerPayloadByteThreshold` | `uint16` | Threshold at which billing switches from base to high rate | +| `destDataAvailabilityOverheadGas` | `uint32` | Data availability gas charged for overhead costs (e.g., OCR) | +| `destGasPerDataAvailabilityByte` | `uint16` | Gas units charged per byte needing data availability | +| `destDataAvailabilityMultiplierBps` | `uint16` | Multiplier for data availability gas (multiples of bps, or 0.0001) | +| `chainFamilySelector` | `bytes4` | Selector identifying the destination chain's family (see [Internal](/ccip/api-reference/evm/v1.6.3/internal#state-variables)) | +| `enforceOutOfOrder` | `bool` | Whether to enforce `allowOutOfOrderExecution` extraArg to be true | +| `defaultTokenFeeUSDCents` | `uint16` | Default token fee per transfer in USD cents (multiples of 0.01 USD) | +| `defaultTokenDestGasOverhead` | `uint32` | Default gas charged for token transfers on destination chain | +| `defaultTxGasLimit` | `uint32` | Default gas limit for transactions | +| `gasMultiplierWeiPerEth` | `uint64` | Multiplier for gas costs (1e18 based, e.g., 11e17 = 10% extra cost) | +| `gasPriceStalenessThreshold` | `uint32` | Time in seconds before gas price is considered stale (0 = disabled) | +| `networkFeeUSDCents` | `uint32` | Flat network fee for messages in USD cents (multiples of 0.01 USD) | + +### StaticConfig + +Structure containing immutable FeeQuoter configuration set at deployment. + +```solidity +struct StaticConfig { + uint96 maxFeeJuelsPerMsg; + address linkToken; + uint32 tokenPriceStalenessThreshold; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------------------ | --------- | -------------------------------------------------------- | +| `maxFeeJuelsPerMsg` | `uint96` | Maximum fee that can be charged for a message in Juels | +| `linkToken` | `address` | Address of the LINK token contract | +| `tokenPriceStalenessThreshold` | `uint32` | Time in seconds before a token price is considered stale | + +## State Variables + +### FEE_BASE_DECIMALS + +```solidity +uint256 public constant FEE_BASE_DECIMALS = 36; +``` + + + +### typeAndVersion + +```solidity +string public constant typeAndVersion = "FeeQuoter 1.6.3"; +``` + + + +## Functions + +### convertTokenAmount + +Converts a token amount from one token to another using current prices. + +```solidity +function convertTokenAmount(address fromToken, uint256 fromTokenAmount, address toToken) public view returns (uint256); +``` + + + +**Parameters** + +| Name | Type | Description | +| ----------------- | --------- | ---------------------- | +| `fromToken` | `address` | Source token address | +| `fromTokenAmount` | `uint256` | Amount in source token | +| `toToken` | `address` | Target token address | + +**Returns** + +| Type | Description | +| --------- | --------------------------------- | +| `uint256` | Equivalent amount in target token | + +### getFeeTokens + +Gets the list of supported fee tokens. + +```solidity +function getFeeTokens() external view returns (address[] memory); +``` + + + +**Returns** + +| Type | Description | +| ----------- | -------------------------------------- | +| `address[]` | Array of supported fee token addresses | + +### getValidatedFee + +Calculates the validated fee for sending a cross-chain message. + +```solidity +function getValidatedFee(uint64 destChainSelector, Client.EVM2AnyMessage calldata message) external view returns (uint256 feeTokenAmount); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | ----------------------- | ---------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `message` | `Client.EVM2AnyMessage` | Message to calculate fee for | + +**Returns** + +| Type | Description | +| --------- | -------------------------------------------------- | +| `uint256` | Fee amount in the message's fee token denomination | + +### getTokenTransferFeeConfig + +Gets the token transfer fee configuration for a specific token and destination chain. + +```solidity +function getTokenTransferFeeConfig(uint64 destChainSelector, address token) external view returns (TokenTransferFeeConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | --------- | -------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | +| `token` | `address` | Token address | + +**Returns** + +| Type | Description | +| --------------------------------------------------- | ---------------------------------------------- | +| [`TokenTransferFeeConfig`](#tokentransferfeeconfig) | Token transfer fee configuration for the token | + +### getDestChainConfig + +Gets the configuration for a destination chain. + +```solidity +function getDestChainConfig(uint64 destChainSelector) external view returns (DestChainConfig memory); +``` + + + +**Parameters** + +| Name | Type | Description | +| ------------------- | -------- | -------------------------- | +| `destChainSelector` | `uint64` | Destination chain selector | + +**Returns** + +| Type | Description | +| ------------------------------------- | ------------------------------- | +| [`DestChainConfig`](#destchainconfig) | Destination chain configuration | + +### getStaticConfig + +Gets the static configuration of the FeeQuoter. + +```solidity +function getStaticConfig() external view returns (StaticConfig memory); +``` + + + +**Returns** + +| Type | Description | +| ------------------------------- | ------------------------------------------------------------- | +| [`StaticConfig`](#staticconfig) | Static configuration including max fee and LINK token address | diff --git a/src/content/ccip/api-reference/evm/v1.6.3/internal.mdx b/src/content/ccip/api-reference/evm/v1.6.3/internal.mdx new file mode 100644 index 00000000000..870f3e9ba1c --- /dev/null +++ b/src/content/ccip/api-reference/evm/v1.6.3/internal.mdx @@ -0,0 +1,194 @@ +--- +section: ccip +date: Last Modified +title: "CCIP v1.6.3 Internal Library API Reference" +metadata: + description: "Complete API documentation for the Internal library in Chainlink CCIP v1.6.3. Internal data structures, constants, and utilities for cross-chain message processing." + excerpt: "ccip internal library api reference v1.6.3 rampmessageheader evm2anyrampmessage any2evmrampmessage tokentransfer execution report merkle root" + version: "1.6.3" + datePublished: "2025-11-05T15:38:00Z" + lastModified: "2025-11-05T15:38:00Z" +--- + +import { Aside } from "@components" +import CcipCommon from "@features/ccip/CcipCommon.astro" + + + +## Internal + +A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing. + +[Git Source](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v1.6.3/chains/evm/contracts/libraries/Internal.sol) + +## Enums + +### MessageExecutionState + +Enum listing the possible message execution states within the offRamp contract. + +```solidity +enum MessageExecutionState { + UNTOUCHED, + IN_PROGRESS, + SUCCESS, + FAILURE +} +``` + + + +## Structs + +### RampMessageHeader + +Structure representing a family-agnostic header for OnRamp and OffRamp messages. + +```solidity +struct RampMessageHeader { + bytes32 messageId; + uint64 sourceChainSelector; + uint64 destChainSelector; + uint64 sequenceNumber; + uint64 nonce; +} +``` + + + +**Properties** + +| Name | Type | Description | +| --------------------- | --------- | --------------------------------------------------------------- | +| `messageId` | `bytes32` | Unique identifier generated with source chain's encoding scheme | +| `sourceChainSelector` | `uint64` | CCIP chain selector of the source chain (not chainId) | +| `destChainSelector` | `uint64` | CCIP chain selector of the destination chain (not chainId) | +| `sequenceNumber` | `uint64` | Sequence number, not unique across lanes | +| `nonce` | `uint64` | Nonce for this lane and sender, not unique across senders/lanes | + +### EVM2AnyTokenTransfer + +Structure representing token transfers from EVM chains to any destination chain. + +```solidity +struct EVM2AnyTokenTransfer { + address sourcePoolAddress; + bytes destTokenAddress; + bytes extraData; + uint256 amount; + bytes destExecData; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ------------------- | --------- | ----------------------------------------------------------- | +| `sourcePoolAddress` | `address` | Source pool EVM address (trusted) | +| `destTokenAddress` | `bytes` | EVM address of the destination token (untrusted) | +| `extraData` | `bytes` | Optional pool data transferred to destination chain | +| `amount` | `uint256` | Amount of tokens to transfer | +| `destExecData` | `bytes` | Destination chain execution data (e.g., gas for EVM chains) | + +### EVM2AnyRampMessage + +Structure representing a family-agnostic message emitted from the OnRamp. + +```solidity +struct EVM2AnyRampMessage { + RampMessageHeader header; + address sender; + bytes data; + bytes receiver; + bytes extraArgs; + address feeToken; + uint256 feeTokenAmount; + uint256 feeValueJuels; + EVM2AnyTokenTransfer[] tokenAmounts; +} +``` + + + +**Properties** + +| Name | Type | Description | +| ---------------- | ------------------------------------------------- | -------------------------------------------------------- | +| `header` | [`RampMessageHeader`](#rampmessageheader) | Message header with identifiers and routing information | +| `sender` | `address` | Sender address on the source chain | +| `data` | `bytes` | Arbitrary data payload supplied by the message sender | +| `receiver` | `bytes` | Receiver address on the destination chain | +| `extraArgs` | `bytes` | Destination-chain specific args (e.g., gasLimit for EVM) | +| `feeToken` | `address` | Token used to pay fees | +| `feeTokenAmount` | `uint256` | Amount of fee token paid | +| `feeValueJuels` | `uint256` | Fee amount denominated in Juels | +| `tokenAmounts` | [`EVM2AnyTokenTransfer[]`](#evm2anytokentransfer) | Array of tokens and amounts to transfer | + +## State Variables + +### CHAIN_FAMILY_SELECTOR_EVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c; +``` + + + +### CHAIN_FAMILY_SELECTOR_SVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SVM = 0x1e10bdc4; +``` + + + +### CHAIN_FAMILY_SELECTOR_APTOS + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_APTOS = 0xac77ffec; +``` + + + +### CHAIN_FAMILY_SELECTOR_SUI + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_SUI = 0xc4e05953; +``` + + + +### CHAIN_FAMILY_SELECTOR_TVM + +```solidity +bytes4 public constant CHAIN_FAMILY_SELECTOR_TVM = 0x647e2ba9; +``` + + diff --git a/src/features/ccip/components/api-reference/Events.astro b/src/features/ccip/components/api-reference/Events.astro index 3265fb66f31..9552c6ff069 100644 --- a/src/features/ccip/components/api-reference/Events.astro +++ b/src/features/ccip/components/api-reference/Events.astro @@ -9,6 +9,7 @@ interface EventParameter { type: string name: string indexed?: boolean + typeLink?: string } // Props with literal types - use the same keys as in data.ts @@ -67,8 +68,8 @@ const renderMarkdown = (text: string): string => { ? event.parameters.map((param: EventParameter, i: number) => ( <> - {param.indexed && indexed } - {param.type} {param.name} + - {param.indexed && indexed } + {param.typeLink ? {param.type} : param.type} {param.name} {i < event.parameters!.length - 1 &&
} From c58ed9f988c196a937b491bf15368d1aa9b99024 Mon Sep 17 00:00:00 2001 From: SyedAsadKazmi Date: Thu, 13 Nov 2025 18:17:51 +0530 Subject: [PATCH 3/3] Fix Events API Reference --- src/config/data/ccip/data.ts | 7 ++--- src/config/data/ccip/events/v1_5_0/index.ts | 2 ++ .../ccip/events/v1_5_0/offramp-receive.json | 15 ---------- .../data/ccip/events/v1_5_0/onramp-send.json | 16 ++-------- .../data/ccip/events/v1_5_0/pool-receive.json | 30 +++++++------------ .../data/ccip/events/v1_5_0/pool-send.json | 29 +++++------------- .../ccip/events/v1_5_1/offramp-receive.json | 15 ---------- .../data/ccip/events/v1_5_1/onramp-send.json | 16 ++-------- .../data/ccip/events/v1_5_1/pool-receive.json | 30 +++++++------------ .../data/ccip/events/v1_5_1/pool-send.json | 29 +++++------------- .../data/ccip/events/v1_6_0/pool-receive.json | 30 +++++++------------ .../data/ccip/events/v1_6_0/pool-send.json | 29 +++++------------- .../ccip/api-reference/evm/v1.5.0/events.mdx | 8 +++++ .../ccip/api-reference/evm/v1.5.0/index.mdx | 6 ++-- .../ccip/api-reference/evm/v1.5.1/index.mdx | 5 +++- .../ccip/api-reference/evm/v1.6.0/index.mdx | 5 +++- .../ccip/api-reference/evm/v1.6.1/index.mdx | 5 +++- .../ccip/api-reference/evm/v1.6.2/index.mdx | 5 +++- .../ccip/api-reference/evm/v1.6.3/index.mdx | 5 +++- 19 files changed, 94 insertions(+), 193 deletions(-) diff --git a/src/config/data/ccip/data.ts b/src/config/data/ccip/data.ts index f5f96ebe9f6..e21f6a1a638 100644 --- a/src/config/data/ccip/data.ts +++ b/src/config/data/ccip/data.ts @@ -124,14 +124,13 @@ type EventTypesV150 = { onrampCCIPSendEvents: CCIPEventEntry[] offrampCCIPReceiveEvents: CCIPEventEntry[] routerCCIPReceiveEvents: CCIPEventEntry[] -} - -// Type for v1.5.1 events -type EventTypesV151 = EventTypesV150 & { poolCCIPSendEvents: CCIPEventEntry[] poolCCIPReceiveEvents: CCIPEventEntry[] } +// Type for v1.5.1 events +type EventTypesV151 = EventTypesV150 + // Type for v1.6.0 events type EventTypesV160 = EventTypesV151 diff --git a/src/config/data/ccip/events/v1_5_0/index.ts b/src/config/data/ccip/events/v1_5_0/index.ts index 7b692cd336f..ee6ddd41296 100644 --- a/src/config/data/ccip/events/v1_5_0/index.ts +++ b/src/config/data/ccip/events/v1_5_0/index.ts @@ -1,3 +1,5 @@ export { default as onrampCCIPSendEvents } from "./onramp-send.json" +export { default as poolCCIPSendEvents } from "./pool-send.json" export { default as offrampCCIPReceiveEvents } from "./offramp-receive.json" export { default as routerCCIPReceiveEvents } from "./router-receive.json" +export { default as poolCCIPReceiveEvents } from "./pool-receive.json" diff --git a/src/config/data/ccip/events/v1_5_0/offramp-receive.json b/src/config/data/ccip/events/v1_5_0/offramp-receive.json index a43ebc53c20..c49ee5fb21d 100644 --- a/src/config/data/ccip/events/v1_5_0/offramp-receive.json +++ b/src/config/data/ccip/events/v1_5_0/offramp-receive.json @@ -2,11 +2,6 @@ { "event": "ExecutionStateChanged", "parameters": [ - { - "type": "uint64", - "name": "sourceChainSelector", - "indexed": true - }, { "type": "uint64", "name": "sequenceNumber", @@ -17,11 +12,6 @@ "name": "messageId", "indexed": true }, - { - "type": "bytes32", - "name": "messageHash", - "indexed": false - }, { "type": "Internal.MessageExecutionState", "name": "state", @@ -32,11 +22,6 @@ "type": "bytes", "name": "returnData", "indexed": false - }, - { - "type": "uint256", - "name": "gasUsed", - "indexed": false } ], "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." diff --git a/src/config/data/ccip/events/v1_5_0/onramp-send.json b/src/config/data/ccip/events/v1_5_0/onramp-send.json index d45666e8488..4d1425754fa 100644 --- a/src/config/data/ccip/events/v1_5_0/onramp-send.json +++ b/src/config/data/ccip/events/v1_5_0/onramp-send.json @@ -1,22 +1,12 @@ [ { - "event": "CCIPMessageSent", + "event": "CCIPSendRequested", "parameters": [ { - "type": "uint64", - "name": "destChainSelector", - "indexed": true - }, - { - "type": "uint64", - "name": "sequenceNumber", - "indexed": true - }, - { - "type": "Internal.EVM2AnyRampMessage", + "type": "Internal.EVM2EVMMessage", "name": "message", "indexed": false, - "typeLink": "/ccip/api-reference/evm/v1.5.0/internal#evm2anyrampmessage" + "typeLink": "/ccip/api-reference/evm/v1.5.0/internal#evm2evmmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_5_0/pool-receive.json b/src/config/data/ccip/events/v1_5_0/pool-receive.json index b09a78a5f32..ff7019acd24 100644 --- a/src/config/data/ccip/events/v1_5_0/pool-receive.json +++ b/src/config/data/ccip/events/v1_5_0/pool-receive.json @@ -1,26 +1,16 @@ [ { - "event": "ReleasedOrMinted", + "event": "Released", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, - { - "type": "address", - "name": "token", - "indexed": false - }, { "type": "address", "name": "sender", - "indexed": false + "indexed": true }, { "type": "address", "name": "recipient", - "indexed": false + "indexed": true }, { "type": "uint256", @@ -28,20 +18,20 @@ "indexed": false } ], - "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + "description": "Emitted when tokens are released to the receiver on the destination chain." }, { - "event": "InboundRateLimitConsumed", + "event": "Minted", "parameters": [ { - "type": "uint64", - "name": "remoteChainSelector", + "type": "address", + "name": "sender", "indexed": true }, { "type": "address", - "name": "token", - "indexed": false + "name": "recipient", + "indexed": true }, { "type": "uint256", @@ -49,6 +39,6 @@ "indexed": false } ], - "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + "description": "Emitted when tokens are minted to the receiver on the destination chain." } ] diff --git a/src/config/data/ccip/events/v1_5_0/pool-send.json b/src/config/data/ccip/events/v1_5_0/pool-send.json index 016203e1b0d..16d8cab0f71 100644 --- a/src/config/data/ccip/events/v1_5_0/pool-send.json +++ b/src/config/data/ccip/events/v1_5_0/pool-send.json @@ -1,21 +1,11 @@ [ { - "event": "LockedOrBurned", + "event": "Locked", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, - { - "type": "address", - "name": "token", - "indexed": false - }, { "type": "address", "name": "sender", - "indexed": false + "indexed": true }, { "type": "uint256", @@ -23,20 +13,15 @@ "indexed": false } ], - "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + "description": "Emitted when tokens are locked during a cross-chain transfer." }, { - "event": "OutboundRateLimitConsumed", + "event": "Burned", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, { "type": "address", - "name": "token", - "indexed": false + "name": "sender", + "indexed": true }, { "type": "uint256", @@ -44,6 +29,6 @@ "indexed": false } ], - "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + "description": "Emitted when tokens are burned during a cross-chain transfer." } ] diff --git a/src/config/data/ccip/events/v1_5_1/offramp-receive.json b/src/config/data/ccip/events/v1_5_1/offramp-receive.json index 289d5d28380..6cd40127291 100644 --- a/src/config/data/ccip/events/v1_5_1/offramp-receive.json +++ b/src/config/data/ccip/events/v1_5_1/offramp-receive.json @@ -2,11 +2,6 @@ { "event": "ExecutionStateChanged", "parameters": [ - { - "type": "uint64", - "name": "sourceChainSelector", - "indexed": true - }, { "type": "uint64", "name": "sequenceNumber", @@ -17,11 +12,6 @@ "name": "messageId", "indexed": true }, - { - "type": "bytes32", - "name": "messageHash", - "indexed": false - }, { "type": "Internal.MessageExecutionState", "name": "state", @@ -32,11 +22,6 @@ "type": "bytes", "name": "returnData", "indexed": false - }, - { - "type": "uint256", - "name": "gasUsed", - "indexed": false } ], "description": "Emitted when a message execution state changes to SUCCESS or FAILURE." diff --git a/src/config/data/ccip/events/v1_5_1/onramp-send.json b/src/config/data/ccip/events/v1_5_1/onramp-send.json index 6f15fa665d8..b88402632bb 100644 --- a/src/config/data/ccip/events/v1_5_1/onramp-send.json +++ b/src/config/data/ccip/events/v1_5_1/onramp-send.json @@ -1,22 +1,12 @@ [ { - "event": "CCIPMessageSent", + "event": "CCIPSendRequested", "parameters": [ { - "type": "uint64", - "name": "destChainSelector", - "indexed": true - }, - { - "type": "uint64", - "name": "sequenceNumber", - "indexed": true - }, - { - "type": "Internal.EVM2AnyRampMessage", + "type": "Internal.EVM2EVMMessage", "name": "message", "indexed": false, - "typeLink": "/ccip/api-reference/evm/v1.5.1/internal#evm2anyrampmessage" + "typeLink": "/ccip/api-reference/evm/v1.5.1/internal#evm2evmmessage" } ], "description": "Emitted when a CCIP message is successfully sent." diff --git a/src/config/data/ccip/events/v1_5_1/pool-receive.json b/src/config/data/ccip/events/v1_5_1/pool-receive.json index b09a78a5f32..ff7019acd24 100644 --- a/src/config/data/ccip/events/v1_5_1/pool-receive.json +++ b/src/config/data/ccip/events/v1_5_1/pool-receive.json @@ -1,26 +1,16 @@ [ { - "event": "ReleasedOrMinted", + "event": "Released", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, - { - "type": "address", - "name": "token", - "indexed": false - }, { "type": "address", "name": "sender", - "indexed": false + "indexed": true }, { "type": "address", "name": "recipient", - "indexed": false + "indexed": true }, { "type": "uint256", @@ -28,20 +18,20 @@ "indexed": false } ], - "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + "description": "Emitted when tokens are released to the receiver on the destination chain." }, { - "event": "InboundRateLimitConsumed", + "event": "Minted", "parameters": [ { - "type": "uint64", - "name": "remoteChainSelector", + "type": "address", + "name": "sender", "indexed": true }, { "type": "address", - "name": "token", - "indexed": false + "name": "recipient", + "indexed": true }, { "type": "uint256", @@ -49,6 +39,6 @@ "indexed": false } ], - "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + "description": "Emitted when tokens are minted to the receiver on the destination chain." } ] diff --git a/src/config/data/ccip/events/v1_5_1/pool-send.json b/src/config/data/ccip/events/v1_5_1/pool-send.json index 016203e1b0d..16d8cab0f71 100644 --- a/src/config/data/ccip/events/v1_5_1/pool-send.json +++ b/src/config/data/ccip/events/v1_5_1/pool-send.json @@ -1,21 +1,11 @@ [ { - "event": "LockedOrBurned", + "event": "Locked", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, - { - "type": "address", - "name": "token", - "indexed": false - }, { "type": "address", "name": "sender", - "indexed": false + "indexed": true }, { "type": "uint256", @@ -23,20 +13,15 @@ "indexed": false } ], - "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + "description": "Emitted when tokens are locked during a cross-chain transfer." }, { - "event": "OutboundRateLimitConsumed", + "event": "Burned", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, { "type": "address", - "name": "token", - "indexed": false + "name": "sender", + "indexed": true }, { "type": "uint256", @@ -44,6 +29,6 @@ "indexed": false } ], - "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + "description": "Emitted when tokens are burned during a cross-chain transfer." } ] diff --git a/src/config/data/ccip/events/v1_6_0/pool-receive.json b/src/config/data/ccip/events/v1_6_0/pool-receive.json index b09a78a5f32..ff7019acd24 100644 --- a/src/config/data/ccip/events/v1_6_0/pool-receive.json +++ b/src/config/data/ccip/events/v1_6_0/pool-receive.json @@ -1,26 +1,16 @@ [ { - "event": "ReleasedOrMinted", + "event": "Released", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, - { - "type": "address", - "name": "token", - "indexed": false - }, { "type": "address", "name": "sender", - "indexed": false + "indexed": true }, { "type": "address", "name": "recipient", - "indexed": false + "indexed": true }, { "type": "uint256", @@ -28,20 +18,20 @@ "indexed": false } ], - "description": "Emitted when tokens are released or minted to the receiver on the destination chain." + "description": "Emitted when tokens are released to the receiver on the destination chain." }, { - "event": "InboundRateLimitConsumed", + "event": "Minted", "parameters": [ { - "type": "uint64", - "name": "remoteChainSelector", + "type": "address", + "name": "sender", "indexed": true }, { "type": "address", - "name": "token", - "indexed": false + "name": "recipient", + "indexed": true }, { "type": "uint256", @@ -49,6 +39,6 @@ "indexed": false } ], - "description": "Emitted when inbound rate limit capacity is consumed for a token transfer." + "description": "Emitted when tokens are minted to the receiver on the destination chain." } ] diff --git a/src/config/data/ccip/events/v1_6_0/pool-send.json b/src/config/data/ccip/events/v1_6_0/pool-send.json index 016203e1b0d..16d8cab0f71 100644 --- a/src/config/data/ccip/events/v1_6_0/pool-send.json +++ b/src/config/data/ccip/events/v1_6_0/pool-send.json @@ -1,21 +1,11 @@ [ { - "event": "LockedOrBurned", + "event": "Locked", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, - { - "type": "address", - "name": "token", - "indexed": false - }, { "type": "address", "name": "sender", - "indexed": false + "indexed": true }, { "type": "uint256", @@ -23,20 +13,15 @@ "indexed": false } ], - "description": "Emitted when tokens are locked or burned during a cross-chain transfer." + "description": "Emitted when tokens are locked during a cross-chain transfer." }, { - "event": "OutboundRateLimitConsumed", + "event": "Burned", "parameters": [ - { - "type": "uint64", - "name": "remoteChainSelector", - "indexed": true - }, { "type": "address", - "name": "token", - "indexed": false + "name": "sender", + "indexed": true }, { "type": "uint256", @@ -44,6 +29,6 @@ "indexed": false } ], - "description": "Emitted when outbound rate limit capacity is consumed for a token transfer." + "description": "Emitted when tokens are burned during a cross-chain transfer." } ] diff --git a/src/content/ccip/api-reference/evm/v1.5.0/events.mdx b/src/content/ccip/api-reference/evm/v1.5.0/events.mdx index c3c3e25d251..7ad5496ec96 100644 --- a/src/content/ccip/api-reference/evm/v1.5.0/events.mdx +++ b/src/content/ccip/api-reference/evm/v1.5.0/events.mdx @@ -22,6 +22,10 @@ These events are emitted when sending a cross-chain message using the `ccipSend` +### Token Pool (Send) + + + ## `ccipReceive` These events are emitted when a cross-chain message is executed on the destination chain. @@ -33,3 +37,7 @@ These events are emitted when a cross-chain message is executed on the destinati ### Router + +### Token Pool (Receive) + + diff --git a/src/content/ccip/api-reference/evm/v1.5.0/index.mdx b/src/content/ccip/api-reference/evm/v1.5.0/index.mdx index 345f49b3331..179d26ca19e 100644 --- a/src/content/ccip/api-reference/evm/v1.5.0/index.mdx +++ b/src/content/ccip/api-reference/evm/v1.5.0/index.mdx @@ -22,8 +22,9 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" ### Core Components -- [Client](/ccip/api-reference/evm/v1.5.0/client) - Library providing structs and types for building CCIP messages - [CCIPReceiver](/ccip/api-reference/evm/v1.5.0/ccip-receiver) - Base contract for receiving CCIP messages +- [Client](/ccip/api-reference/evm/v1.5.0/client) - Library providing structs and types for building CCIP messages +- [Internal](/ccip/api-reference/evm/v1.5.0/internal) - Library providing internal data structures and utilities for cross-chain message processing - [IRouterClient](/ccip/api-reference/evm/v1.5.0/i-router-client) - Interface for sending messages through CCIP - [Pool](/ccip/api-reference/evm/v1.5.0/pool) - Library providing token pool functions for cross-chain operations @@ -40,6 +41,7 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [TokenAdminRegistry](/ccip/api-reference/evm/v1.5.0/token-admin-registry) - Contract for storing token pool configurations - [RegistryModuleOwnerCustom](/ccip/api-reference/evm/v1.5.0/registry-module-owner-custom) - Registry module for token admin registration -### Error Handling +### Events and Error Handling +- [Events](/ccip/api-reference/evm/v1.5.0/events) - Events emitted during CCIP operations including `ccipSend` and `ccipReceive` - [Errors](/ccip/api-reference/evm/v1.5.0/errors) - Comprehensive list of CCIP error codes and their descriptions diff --git a/src/content/ccip/api-reference/evm/v1.5.1/index.mdx b/src/content/ccip/api-reference/evm/v1.5.1/index.mdx index 2bf8175d0ac..83103e0af73 100644 --- a/src/content/ccip/api-reference/evm/v1.5.1/index.mdx +++ b/src/content/ccip/api-reference/evm/v1.5.1/index.mdx @@ -20,6 +20,8 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [CCIPReceiver](/ccip/api-reference/evm/v1.5.1/ccip-receiver) - Base contract for receiving CCIP messages - [Client](/ccip/api-reference/evm/v1.5.1/client) - Library providing structs and types for building CCIP messages +- [FeeQuoter](/ccip/api-reference/evm/v1.5.1/fee-quoter) - Contract for managing gas and token prices in USD and calculating cross-chain fees +- [Internal](/ccip/api-reference/evm/v1.5.1/internal) - Library providing internal data structures and utilities for cross-chain message processing - [IRouterClient](/ccip/api-reference/evm/v1.5.1/i-router-client) - Interface for sending messages through CCIP - [Pool](/ccip/api-reference/evm/v1.5.1/pool) - Library providing token pool functions for cross-chain operations - [RateLimiter](/ccip/api-reference/evm/v1.5.1/rate-limiter) - Contract for managing rate limits on token transfers @@ -44,6 +46,7 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [RegistryModuleOwnerCustom](/ccip/api-reference/evm/v1.5.1/registry-module-owner-custom) - Registry module for token admin registration - [TokenAdminRegistry](/ccip/api-reference/evm/v1.5.1/token-admin-registry) - Contract for storing token pool configurations -### Error Handling +### Events and Error Handling +- [Events](/ccip/api-reference/evm/v1.5.1/events) - Events emitted during CCIP operations including `ccipSend` and `ccipReceive` - [Errors](/ccip/api-reference/evm/v1.5.1/errors) - Comprehensive list of CCIP error codes and their descriptions diff --git a/src/content/ccip/api-reference/evm/v1.6.0/index.mdx b/src/content/ccip/api-reference/evm/v1.6.0/index.mdx index 35fa8571f00..73ac1bfb84d 100644 --- a/src/content/ccip/api-reference/evm/v1.6.0/index.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.0/index.mdx @@ -24,6 +24,8 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [CCIPReceiver](/ccip/api-reference/evm/v1.6.0/ccip-receiver) - Base contract for receiving CCIP messages - [Client](/ccip/api-reference/evm/v1.6.0/client) - Library providing structs and types for building CCIP messages +- [FeeQuoter](/ccip/api-reference/evm/v1.6.0/fee-quoter) - Contract for managing gas and token prices in USD and calculating cross-chain fees +- [Internal](/ccip/api-reference/evm/v1.6.0/internal) - Library providing internal data structures and utilities for cross-chain message processing - [IRouterClient](/ccip/api-reference/evm/v1.6.0/i-router-client) - Interface for sending messages through CCIP - [Pool](/ccip/api-reference/evm/v1.6.0/pool) - Library providing token pool functions for cross-chain operations - [RateLimiter](/ccip/api-reference/evm/v1.6.0/rate-limiter) - Contract for managing rate limits on token transfers @@ -48,6 +50,7 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [RegistryModuleOwnerCustom](/ccip/api-reference/evm/v1.6.0/registry-module-owner-custom) - Registry module for token admin registration - [TokenAdminRegistry](/ccip/api-reference/evm/v1.6.0/token-admin-registry) - Contract for storing token pool configurations -### Error Handling +### Events and Error Handling +- [Events](/ccip/api-reference/evm/v1.6.0/events) - Events emitted during CCIP operations including `ccipSend` and `ccipReceive` - [Errors](/ccip/api-reference/evm/v1.6.0/errors) - Comprehensive list of CCIP error codes and their descriptions diff --git a/src/content/ccip/api-reference/evm/v1.6.1/index.mdx b/src/content/ccip/api-reference/evm/v1.6.1/index.mdx index 23a2e1a4677..db776a5531e 100644 --- a/src/content/ccip/api-reference/evm/v1.6.1/index.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.1/index.mdx @@ -24,6 +24,8 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [CCIPReceiver](/ccip/api-reference/evm/v1.6.1/ccip-receiver) - Base contract for receiving CCIP messages - [Client](/ccip/api-reference/evm/v1.6.1/client) - Library providing structs and types for building CCIP messages +- [FeeQuoter](/ccip/api-reference/evm/v1.6.1/fee-quoter) - Contract for managing gas and token prices in USD and calculating cross-chain fees +- [Internal](/ccip/api-reference/evm/v1.6.1/internal) - Library providing internal data structures and utilities for cross-chain message processing - [IRouterClient](/ccip/api-reference/evm/v1.6.1/i-router-client) - Interface for sending messages through CCIP - [Pool](/ccip/api-reference/evm/v1.6.1/pool) - Library providing token pool functions for cross-chain operations - [RateLimiter](/ccip/api-reference/evm/v1.6.1/rate-limiter) - Contract for managing rate limits on token transfers @@ -48,6 +50,7 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [RegistryModuleOwnerCustom](/ccip/api-reference/evm/v1.6.1/registry-module-owner-custom) - Registry module for token admin registration - [TokenAdminRegistry](/ccip/api-reference/evm/v1.6.1/token-admin-registry) - Contract for storing token pool configurations -### Error Handling +### Events and Error Handling +- [Events](/ccip/api-reference/evm/v1.6.1/events) - Events emitted during CCIP operations including `ccipSend` and `ccipReceive` - [Errors](/ccip/api-reference/evm/v1.6.1/errors) - Comprehensive list of CCIP error codes and their descriptions diff --git a/src/content/ccip/api-reference/evm/v1.6.2/index.mdx b/src/content/ccip/api-reference/evm/v1.6.2/index.mdx index 689e17a3e4a..5ba64f09094 100644 --- a/src/content/ccip/api-reference/evm/v1.6.2/index.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.2/index.mdx @@ -24,6 +24,8 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [CCIPReceiver](/ccip/api-reference/evm/v1.6.2/ccip-receiver) - Base contract for receiving CCIP messages - [Client](/ccip/api-reference/evm/v1.6.2/client) - Library providing structs and types for building CCIP messages +- [FeeQuoter](/ccip/api-reference/evm/v1.6.2/fee-quoter) - Contract for managing gas and token prices in USD and calculating cross-chain fees +- [Internal](/ccip/api-reference/evm/v1.6.2/internal) - Library providing internal data structures and utilities for cross-chain message processing - [IRouterClient](/ccip/api-reference/evm/v1.6.2/i-router-client) - Interface for sending messages through CCIP - [Pool](/ccip/api-reference/evm/v1.6.2/pool) - Library providing token pool functions for cross-chain operations - [RateLimiter](/ccip/api-reference/evm/v1.6.2/rate-limiter) - Contract for managing rate limits on token transfers @@ -48,6 +50,7 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [RegistryModuleOwnerCustom](/ccip/api-reference/evm/v1.6.2/registry-module-owner-custom) - Registry module for token admin registration - [TokenAdminRegistry](/ccip/api-reference/evm/v1.6.2/token-admin-registry) - Contract for storing token pool configurations -### Error Handling +### Events and Error Handling +- [Events](/ccip/api-reference/evm/v1.6.2/events) - Events emitted during CCIP operations including `ccipSend` and `ccipReceive` - [Errors](/ccip/api-reference/evm/v1.6.2/errors) - Comprehensive list of CCIP error codes and their descriptions diff --git a/src/content/ccip/api-reference/evm/v1.6.3/index.mdx b/src/content/ccip/api-reference/evm/v1.6.3/index.mdx index 30e414221eb..79683e78d2a 100644 --- a/src/content/ccip/api-reference/evm/v1.6.3/index.mdx +++ b/src/content/ccip/api-reference/evm/v1.6.3/index.mdx @@ -24,6 +24,8 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [CCIPReceiver](/ccip/api-reference/evm/v1.6.3/ccip-receiver) - Base contract for receiving CCIP messages - [Client](/ccip/api-reference/evm/v1.6.3/client) - Library providing structs and types for building CCIP messages +- [FeeQuoter](/ccip/api-reference/evm/v1.6.3/fee-quoter) - Contract for managing gas and token prices in USD and calculating cross-chain fees +- [Internal](/ccip/api-reference/evm/v1.6.3/internal) - Library providing internal data structures and utilities for cross-chain message processing - [IRouterClient](/ccip/api-reference/evm/v1.6.3/i-router-client) - Interface for sending messages through CCIP - [Pool](/ccip/api-reference/evm/v1.6.3/pool) - Library providing token pool functions for cross-chain operations - [RateLimiter](/ccip/api-reference/evm/v1.6.3/rate-limiter) - Contract for managing rate limits on token transfers @@ -48,6 +50,7 @@ import CcipCommon from "@features/ccip/CcipCommon.astro" - [RegistryModuleOwnerCustom](/ccip/api-reference/evm/v1.6.3/registry-module-owner-custom) - Registry module for token admin registration - [TokenAdminRegistry](/ccip/api-reference/evm/v1.6.3/token-admin-registry) - Contract for storing token pool configurations -### Error Handling +### Events and Error Handling +- [Events](/ccip/api-reference/evm/v1.6.3/events) - Events emitted during CCIP operations including `ccipSend` and `ccipReceive` - [Errors](/ccip/api-reference/evm/v1.6.3/errors) - Comprehensive list of CCIP error codes and their descriptions