
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
forge-utils
Advanced tools
Forge-utils is a collection of utility scripts for working with Foundry projects. It provides various commands to help manage and process Foundry deployments and artifacts.
You can install forge-utils using npm or yarn:
npm install -g forge-utils
# or
yarn global add forge-utils
Forge-utils provides several commands that can be run using the forge-utils CLI:
Generates a networks.json file based on Forge deployment scripts.
Usage:
forge-utils generate-subgraph-networks <package> [env] --output <output_path> --dir <broadcast_dir>
<package>: NPM package or path to the directory of Forge build artifacts[env]: (Optional) Environment to filter deployments (e.g., staging, production)--output: Path to output the networks.json file (default: current directory)--dir: Folder where the broadcast directory is located (default: 'broadcast')Example:
forge-utils generate-subgraph-networks my-forge-project staging --output ./subgraph --dir ./broadcast
This will generate a networks.json file in the ./subgraph directory. The file might look like this:
{
"mainnet": {
"MyContract": {
"address": "0x1234567890123456789012345678901234567890"
},
"AnotherContract": {
"address": "0x0987654321098765432109876543210987654321"
}
},
"goerli": {
"MyContract": {
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
},
"AnotherContract": {
"address": "0xfedcbafedcbafedcbafedcbafedcbafedcbafed"
}
}
}
Generates a deployments.json file based on Forge deployment scripts.
Usage:
forge-utils generate-deployments-json --dir <broadcast_dir> --output <output_path>
--dir: Directory of Forge broadcast files (default: './broadcast')--output: Where to output the deployments.json file (default: current directory)Example:
forge-utils generate-deployments-json --dir ./broadcast --output ./deployments
This will generate a deployments.json file in the ./deployments directory. The file might contain:
{
"production": {
"1": {
"MyContract": {
"address": "0x1234567890123456789012345678901234567890",
"deploymentBlock": 12345678
}
},
"5": {
"MyContract": {
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"deploymentBlock": 87654321
}
}
}
}
Removes all bytecodes from Typechain factories.
Usage:
forge-utils clean-typechain-bytecode [path]
[path]: Path to the folder to clean the bytecode from (default: './typechain')Example:
forge-utils clean-typechain-bytecode ./typechain
This command doesn't produce any output file, but it modifies the Typechain factory files in the specified directory. For example, a line in a factory file might change from:
const _bytecode = "0x60806040...long bytecode...";
to:
const _bytecode = "0x";
Appends meta information to Forge broadcast JSON files.
Usage:
forge-utils append-meta-to-broadcast --dir <broadcast_dir> --meta <meta_info> [--new-files]
--dir: Directory containing broadcast files (default: './broadcast')--meta: Meta information to append (e.g., meta.env=staging)--new-files: Only process files that are new to Git (optional)Example:
forge-utils append-meta-to-broadcast --dir ./broadcast --meta meta.env=staging --new-files
This command modifies the broadcast JSON files in the specified directory. It doesn't create new files, but updates existing ones. For example, a broadcast file might be updated to include:
{
"transactions": [...],
"meta": {
"env": "staging"
}
}
To set up the project for development:
yarn installyarn compileyarn testThis project is licensed under the MIT License.
FAQs
Utility scripts for working with a foundry project
The npm package forge-utils receives a total of 1 weekly downloads. As such, forge-utils popularity was classified as not popular.
We found that forge-utils 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.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.