Chainlink Local - Documentation
Last updated
Last updated
The go-to place for developers who want to learn how to build applications using Chainlink Local
Chainlink Local is an installable dependency. It provides a tool (the Chainlink Local Simulator) that developers import into their Foundry and Hardhat scripts. This tool runs Chainlink CCIP locally which means developers can rapidly explore, prototype and iterate CCIP dApps off-chain, and move to testnet only when they're ready to test in a live environment.
The package exposes a set of smart contracts and scripts with which you build, deploy and execute CCIP token transfers and arbitrary messages on a local Hardhat or Anvil (Foundry) development node. Chainlink Local also supports forked nodes.
User Contracts tested with Chainlink Local can be deployed to test networks without any modifications.
Install the package by running:
and then set remappings to: @chainlink/local/=lib/chainlink-local/
in either remappings.txt
or foundry.toml
file
Import CCIPLocalSimulator.sol
inside your tests or scripts, for example: