@chainlink/evm-gauntlet-functions

中文文档
1.4.1发布于 2024/08/27TypeScriptCommonJS近 30 天下载 1.1万

EVM Gauntlet Functions

原始使用文档

Chainlink Functions package

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:

  1. From the @chainlink repository go to /contracts.
  2. Run forge build
  3. 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:

  1. From the @chainlink repository go to /contracts.
  2. 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'
  1. Run:
forge build --build-info --build-info-path=./info
  1. 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:

  1. Make experimental changes
  2. Bump the version here in gauntlet-evm's @chainlink/evm-gauntlet-functions package.json
  3. Run yarn build from the gauntlet-evm respository
  4. Now in the gauntlet repository link local package version using npm link [path to gauntlet-evm's @chainlink/evm-gauntlet-functions package.json]
  5. 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
  6. Run yarn install from the gauntlet repository
  7. Run yarn build from the gauntlet repository
  8. 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
  9. 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

版本与发布记录

@chainlink/evm-gauntlet-functions 共发布 103 个版本,首次发布于 2023/08/10;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.4.1latest2024/08/272 年前
0.0.0-develop-20240826160451develop2024/08/272 年前
1.4.02024/08/162 年前
0.0.0-develop-202408152011012024/08/162 年前
1.3.02024/08/032 年前
0.0.0-develop-202408022131342024/08/032 年前

关于 @chainlink/evm-gauntlet-functions 的常见问题

@chainlink/evm-gauntlet-functions 是什么?

EVM Gauntlet Functions

如何安装 @chainlink/evm-gauntlet-functions?

在项目目录运行 npm install @chainlink/evm-gauntlet-functions,或使用 pnpm add / yarn add / bun add。

@chainlink/evm-gauntlet-functions 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@chainlink/evm-gauntlet-functions 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@chainlink/evm-gauntlet-functions 可以商用吗?

@chainlink/evm-gauntlet-functions 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@chainlink/evm-gauntlet-functions 的下载量有多少?

根据 npm 官方下载统计,@chainlink/evm-gauntlet-functions 在 2026/10/10 – 2026/11/08 这 30 天内被下载 11,141 次,日均约 371 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@chainlink/evm-gauntlet-functions 还在维护吗?

最新版本 1.4.1 发布于 2024/08/27(2 年前);至今共发布 103 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/08/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。