Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foundry

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/

Usage

Build

$ forge build

Test

$ forge test

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Deploy

$ forge script script/DeployBridge.s.sol \
--rpc-url <URL_RPC> \
--broadcast

Cast

$ cast <subcommand>

Help

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

FOR TESTING

source .env
cast send $POLYGON_TEST_TOKEN_ADDR \
"approve(address,uint256)" \
$POLYGON_TEST_CONTRACT_ADDR 1000000000000000000 \
--private-key $PRIVATE_KEY \
--rpc-url $RPC_POLYGON_TEST_URL
cast send $POLYGON_TEST_CONTRACT_ADDR \
"lock(address,uint256,string)" \
$POLYGON_TEST_TOKEN_ADDR 1000000000000000000 bettery1se3ugp5026ty89mxrd2gra7ptyfcge0srvjmme \
--private-key $PRIVATE_KEY \
--rpc-url $RPC_POLYGON_TEST_URL

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages