
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
gate-evm-tools-test
Advanced tools
🛠️ Gate 智能合约工具集 - 字节码检查、合约升级验证、合约状态同步
# 进入项目目录
cd evm-checkcode-cli
# 安装依赖
npm install
# 编译 TypeScript
npm run build
# 登录 NPM(如果还未登录)
npm login
# 输入用户名、密码、邮箱
# 检查包信息
npm pack --dry-run
# 发布包
npm publish
# 如果包名已被占用,可以发布到作用域下
# 先修改 package.json 中的 name 为 "@your-username/bytecode-checker-cli"
# 然后执行:
npm publish --access public
# 更新补丁版本(1.0.0 -> 1.0.1)
npm version patch
# 更新小版本(1.0.0 -> 1.1.0)
npm version minor
# 更新大版本(1.0.0 -> 2.0.0)
npm version major
# 发布新版本
npm publish
在你的 Hardhat 项目中安装:
npm install --save-dev gate-evm-tools
或全局安装:
npm install -g gate-evm-tools
在项目根目录创建 contractInfo.json 文件:
{
"eth": {
"Vault": "0x80aaf2e4636c510e067a5d300d8bafd48027addf",
"VaultCrossChainRelay": "0x060194eec4556096baaabd6bf553d2658d6a66ab"
},
"bsc": {
"Vault": "0x2cb7d2603a5f43b9fe79e98f09fe3eec40b6765d",
"VaultCrossChainRelay": "0x23ae3a565e0896866e7725fe6d49fd777359c162"
}
}
格式说明:
hardhat.config.js 中的网络名称一致)确保 hardhat.config.js 中配置了相应的网络:
module.exports = {
networks: {
eth: {
url: "https://eth-mainnet.g.alchemy.com/v2/YOUR-API-KEY",
},
bsc: {
url: "https://bsc-dataseed.binance.org/",
}
}
};
npx hardhat compile
npx gate-tool --help
# 检查所有合约
npx gate-tool check
# 检查指定合约
npx gate-tool check --contract Vault
# 检查指定网络
npx gate-tool check --network eth
# 指定配置文件路径
npx gate-tool check --config ./config/contracts.json
# 指定输出报告路径
npx gate-tool check --output ./reports/result.json
当合约通过 calldata 方式由其他人(如多签钱包)执行升级后,本地的 .openzeppelin 文件不会自动更新。使用此命令可以从链上读取最新状态并更新本地文件。
# 同步合约状态
npx gate-tool sync \
--proxy 0x1234... \
--contract CounterUUPS \
--network sepolia
验证合约升级的安全性,并生成 upgradeToAndCall 的 calldata。
# 不同合约升级(从 CounterUUPS 升级到 CounterUUPSV2)
npx gate-tool validate \
--proxy 0x1234... \
--old CounterUUPS \
--new CounterUUPSV2 \
--network sepolia
# 同一合约升级(修改现有合约后升级)
npx gate-tool validate \
--proxy 0x1234... \
--old CounterUUPS \
--new CounterUUPS \
--network sepolia
# 指定输出文件路径
npx gate-tool validate \
--proxy 0x1234... \
--old CounterUUPS \
--new CounterUUPSV2 \
--network sepolia \
--output ./upgrade-info.json
注意: validate 命令会在链上部署新的实现合约(仅用于验证),但不会升级代理合约。请使用生成的 calldata 通过多签钱包执行升级。
| 选项 | 简写 | 说明 | 默认值 |
|---|---|---|---|
--contract <name> | -c | 指定要检查的合约名称 | - |
--network <name> | -n | 指定要检查的网络名称 | - |
--config <path> | - | 指定配置文件路径 | ./contractInfo.json |
--output <path> | -o | 指定输出报告文件路径 | ./bytecode-check-report.json |
| 选项 | 简写 | 说明 | 必需 |
|---|---|---|---|
--proxy <address> | - | 代理合约地址 | ✅ |
--contract <name> | - | 合约名称 | ✅ |
--network <name> | -n | 网络名称 | - |
| 选项 | 简写 | 说明 | 必需 |
|---|---|---|---|
--proxy <address> | - | 代理合约地址 | ✅ |
--old <name> | - | 旧合约名称 | ✅ |
--new <name> | - | 新合约名称 | ✅ |
--network <name> | -n | 网络名称 | - |
--output <path> | -o | 输出文件路径 | ./upgradeCalldata.json |
FAQs
Gate 智能合约工具集 - 字节码检查、合约升级验证、合约状态同步
The npm package gate-evm-tools-test receives a total of 7 weekly downloads. As such, gate-evm-tools-test popularity was classified as not popular.
We found that gate-evm-tools-test demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.