🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@chainlink/evm-gauntlet-functions

Package Overview
Dependencies
Maintainers
0
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainlink/evm-gauntlet-functions

EVM Gauntlet Functions

1.4.1
latest
npm
Version published
Weekly downloads
2K
-58.62%
Maintainers
0
Weekly downloads
 
Created
Source

This package is an contains the comands necessary for interacting with the Chainlink Functions contracts

Handling contract updates

Whenever a contract is changed, the ABI and build must be updated this Gauntlet package.

Prerequisites:

First, ensure that Foundry is installed

In your local environment set the following environment variable to tell Foundry to use the Functions profile:

export FOUNDRY_PROFILE=functions

To update an ABI:

  • From the @chainlink repository go to /contracts.
  • Run forge build
  • In the folder ./contracts/foundry-artifacts/<contract name>/<contract name>.json there will be artifacts. Find the relevant contracts and copy the ABI.

To regenerate the FunctionsContracts.build.json file:

  • From the @chainlink repository go to /contracts.
  • In foundry.toml the [profile.functions] temporarily update test to point only to the
test = 'src/v0.8/functions/tests/v1_X/testhelpers/FunctionsClientUpgradeHelper.sol'
  • Run:
forge build --build-info --build-info-path=./info
  • You will notice a new folder in ./contracts/info. Verify that it looks as expected, then copy the contents into FunctionsContracts.build.json

*If using Linux, remove the .Linux.gcc suffix from the end of the field "solcLongVersion"

Using a local build

There are scenarios such as when testing new code or deploying to a staging DON that you may want to make changes and use them through the Gauntlet package.

The proper way to do this would be:

  • Make experimental changes
  • Bump the version here in gauntlet-evm's @chainlink/evm-gauntlet-functions package.json
  • Run yarn build from the gauntlet-evm respository
  • Now in the gauntlet repository link local package version using npm link [path to gauntlet-evm's @chainlink/evm-gauntlet-functions package.json]
  • Change gauntlet's package.json to depend on the local version that was bumped to in gauntlet-evm's @chainlink/evm-gauntlet-functions package.json
  • Run yarn install from the gauntlet repository
  • Run yarn build from the gauntlet repository
  • To verify, the gauntlet repository's node_modules should have @chainlink/evm-gauntlet-functions with the version that you set locally and running npm ls -g should show the local package version
  • Now that the packages are linked any hot changes to gauntlet-evm can be reloaded by running yarn build in gauntlet-evm and then again in gauntlet

Keywords

typescript

FAQs

Package last updated on 26 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts