Client
Title: Client (Chainlink CCIP) — vendored subset
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Vendored minimal subset of Chainlink CCIP's Client library (https://github.com/smartcontractkit/chainlink-ccip). Upstream license: MIT.
Minimal vendored subset of Chainlink CCIP's Client library: the EVM messaging structs and the
GenericExtraArgsV2 encoder used by CCIPGatewayAdapter. Per the repo "vendor, don't install"
policy, only the surface this Diamond uses is copied — not the SVM/Sui/legacy types.
Verified verbatim against smartcontractkit/chainlink-ccip @ main commit 828897a (2026-06-24):
chains/evm/contracts/libraries/Client.sol. extraArgs is tag || abi.encode(struct) — never a
bare abi.encode. Empty extraArgs defaults to a 200k destination gas limit upstream.
Note:
- lattice-source: Chainlink
Constants
GENERIC_EXTRA_ARGS_V2_TAG
bytes4(keccak256("CCIP EVMExtraArgsV2")); the multi-chain-family default extra-args selector.
bytes4 public constant GENERIC_EXTRA_ARGS_V2_TAG = 0x181dcf10;Functions
_argsToBytes
ABI-encodes GenericExtraArgsV2 with its tag selector for the extraArgs field.
function _argsToBytes(GenericExtraArgsV2 memory extraArgs) internal pure returns (bytes memory bts);Parameters
| Name | Type | Description |
|---|---|---|
| extraArgs | GenericExtraArgsV2 |
Returns
| Name | Type | Description |
|---|---|---|
| bts | bytes |
Structs
EVMTokenAmount
A token + amount pair carried by a CCIP message.
struct EVMTokenAmount {
address token;
uint256 amount;
}Properties
| Name | Type | Description |
|---|---|---|
| token | address | |
| amount | uint256 |
Any2EVMMessage
The message shape delivered to an IAny2EVMMessageReceiver on the destination chain.
struct Any2EVMMessage {
bytes32 messageId;
uint64 sourceChainSelector;
bytes sender;
bytes data;
EVMTokenAmount[] destTokenAmounts;
}Properties
| Name | Type | Description |
|---|---|---|
| messageId | bytes32 | |
| sourceChainSelector | uint64 | |
| sender | bytes | |
| data | bytes | |
| destTokenAmounts | EVMTokenAmount[] |
EVM2AnyMessage
The message shape submitted to IRouterClient.ccipSend on the source chain.
struct EVM2AnyMessage {
bytes receiver;
bytes data;
EVMTokenAmount[] tokenAmounts;
address feeToken;
bytes extraArgs;
}Properties
| Name | Type | Description |
|---|---|---|
| receiver | bytes | |
| data | bytes | |
| tokenAmounts | EVMTokenAmount[] | |
| feeToken | address | |
| extraArgs | bytes |
GenericExtraArgsV2
Generic (V2) extra args for EVM destinations.
allowOutOfOrderExecution is enforced on some lanes (wrong value reverts) — keep it configurable.
struct GenericExtraArgsV2 {
uint256 gasLimit;
bool allowOutOfOrderExecution;
}Properties
| Name | Type | Description |
|---|---|---|
| gasLimit | uint256 | |
| allowOutOfOrderExecution | bool |