Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

syslink/foundry_template

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foundry Template with OpenZeppelin

This template provides a basic setup for a Foundry project with OpenZeppelin 5.1.0 contracts integration.

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

Foundry consists of:

  • Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
  • Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
  • Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
  • Chisel: Fast, utilitarian, and verbose solidity REPL.

Documentation

https://book.getfoundry.sh/

Dependencies Management

This project uses Soldeer for dependency management, which is integrated into Forge.

Install Dependencies

To install all dependencies listed in foundry.toml:

$ forge soldeer install

Add New Dependencies

To add a new dependency (e.g., OpenZeppelin contracts):

$ forge soldeer install @openzeppelin-contracts~5.4.0

To add Forge standard library:

$ forge soldeer install forge-std~1.9.3

Update Dependencies

To update a specific dependency:

$ forge soldeer update @openzeppelin-contracts

To update all dependencies:

$ forge soldeer update

Remove Dependencies

To remove a dependency:

$ forge soldeer uninstall @openzeppelin-contracts

Current Dependencies

This project includes:

  • @openzeppelin-contracts (5.4.0) - OpenZeppelin smart contract library
  • forge-std (1.9.3) - Foundry standard library for testing

Dependencies are stored in the dependencies/ directory and managed through soldeer.lock.

Usage

Build

$ forge build

Test

$ forge test

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Deploy

$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>

Cast

$ cast <subcommand>

Help

$ forge --help
$ anvil --help
$ cast --help

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.