Skip to content

v0.2.9

Latest

Choose a tag to compare

@andrejrakic andrejrakic released this 19 May 19:27
f8c0efe

chainlink local logo

v0.2.9 Release - 19 May 2026

This release fixes the address encoding/decoding 20/32 bytes issue in ccipLocalSimulatorFork

Changelog

Dependencies

Package Version
@chainlink/contracts-ccip 1.6.2
@chainlink/contracts 1.5.0

Fixed

  • CCIPLocalSimulatorFork.switchChainAndRouteMessage now pairs the destination OffRamp with the source OnRamp by reading getSourceChainConfig (v1.6+) and getStaticConfig (pre-v1.6), and falls back to trying other OffRamps with the same sourceChainSelector when execution fails or no deterministic match is found.
  • CCIPLocalSimulatorFork.switchChainAndRouteMessage now correctly decodes destTokenAddress for v1.6 token transfers. The 32-byte abi.encode(address) value was previously truncated via a bytes20 cast, yielding a garbage address and causing the destination OffRamp's TokenAdminRegistry.getPool lookup to revert. Decoding now handles both 32-byte ABI-encoded and 20-byte packed forms, matching production OffRamp behavior, and is shared with receiver decoding via a single internal _decodeEVMAddress helper.
  • For v1.6 token transfers, sourcePoolAddress is now passed to Internal.Any2EVMTokenTransfer as abi.encode(address) (32-byte word), matching production OnRamp output and destination pool validation. The simulator previously used abi.encodePacked(address) (20 bytes), which caused compatible pools to revert with InvalidSourcePoolAddress during fork testing.

Testing the release

To test this release install @chainlink-local using the following commands:

Foundry (git)

forge install smartcontractkit/chainlink-local@v0.2.9

and then set remappings to: @chainlink/local/=lib/chainlink-local/ in either remappings.txt or foundry.toml file

Hardhat (npm)

npm install @chainlink/local@v0.2.9

and then create the following contract and compile it:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {CCIPLocalSimulator} from "@chainlink/local/src/ccip/CCIPLocalSimulator.sol";

Remix IDE

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {CCIPLocalSimulator} from "https://github.com/smartcontractkit/chainlink-local/blob/v0.2.9/src/ccip/CCIPLocalSimulator.sol";

PRs included

Full Changelog: v0.2.8...v0.2.9