v0.2.3 Release - 30 November 2024
This release adds support for EVMExtraArgsV2
and OZ's AccessControl
to CCIPLocalSimulator.sol
(no-fork local mode)
Changelog
Dependencies
Package | Version |
---|---|
@chainlink/contracts-ccip | 1.5.1-beta.0 |
@chainlink/contracts | 1.1.1 |
- Chainlink CCIP
- Chainlink CCIP v1.5
- Chainlink Data Feeds
- Chainlink Automation
- Chainlink VRF 2
- Chainlink VRF 2.5
Added
- Added
supportNewTokenViaAccessControlDefaultAdmin
function toCCIPLocalSimulator.sol
- Bumped
@chainlink/contracts-ccip
to1.5.1-beta.0
to reflect new changes in the CCIPTokenPool.sol
smart contract (check CCIPv1_5BurnMintPoolFork.t.sol and CCIPv1_5LockReleasePoolFork.t.sol tests) and to supportEVMExtraArgsV2
inMockCCIPRouter.sol
Basic usage
pragma solidity ^0.8.19;
import {Test} from "forge-std/Test.sol";
import {MockERC20BurnAndMintToken} from "../src/MockERC20BurnAndMintToken.sol";
import {CCIPLocalSimulator} from "@chainlink/local/src/ccip/CCIPLocalSimulator.sol";
contract MockERC20BurnAndMintTokenTest is Test {
CCIPLocalSimulator public ccipLocalSimulator;
MockERC20BurnAndMintToken public token;
function setUp() public {
token = new MockERC20BurnAndMintToken();
ccipLocalSimulator = new CCIPLocalSimulator();
}
function test_smoke() public {
ccipLocalSimulator.supportNewTokenViaAccessControlDefaultAdmin(address(token));
}
}
Testing the release
To test this release install @chainlink-local
using the following commands:
Foundry (git)
forge install smartcontractkit/[email protected]
and then set remappings to: @chainlink/local/=lib/chainlink-local/
in either remappings.txt
or foundry.toml
file
Hardhat (npm)
npm install @chainlink/[email protected]
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.3/src/ccip/CCIPLocalSimulator.sol";
PRs included
- Support EVMExtraArgsV2 and OZ's AccessControl in CCIPLocalSimulator by @andrejrakic in #26
Full Changelog: v0.2.2...v0.2.3