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.
# clone the repository
git clone --recursive git@github.com:lista-dao/moolah.git
# update submodules if cloned without --recursive
git submodule update --init --recursiveyarn install$ forge build$ forge testforge test --match-contract SafeGuardTest -vvv
forge test --match-contract BuybackTest --match-test "testExecutorOfNoneOwner" -vvv$ forge fmt$ forge snapshot$ anvil$ forge script <path_to_script> --rpc-url <your_rpc_url> --private-key <your_private_key> --etherscan-api-key <bscscan-api-key> --broadcast --verify -vvv --via-ir
# deploy SafeGuard Contract
$ forge script script/safe/SafeGuard.s.sol:SafeGuardScript --rpc-url <your_rpc_url> --private-key <your_private_key> --etherscan-api-key <bscscan-api-key> --broadcast --verify -vvv$ forge verify-contract --rpc-url <your_rpc_url> --chain-id <chain-id> <address> <contract-name> --api-key <bscscan-api-key>$ cast <subcommand>
$ cast call <contract_address> <method_name> <method_args>
$ cast send <contract_address> <method_name> <method_args> --private-key <private_key>
# demo
$ cast send <contract_address> "addExecutor(address)" <...parameters> --rpc-url $RPC --private-key $PRIVATE_KEY $ forge --help
$ anvil --help
$ cast --helpFiles in this repository are licensed under MIT, see LICENSE, except the V3 LP collateral module, which is licensed under the Business Source License 1.1, see LICENSE-BUSL. A file's SPDX header states which applies: BUSL-1.1 covers src/provider/v3/, src/provider/libraries/{V3PositionLib,SwapInventoryLib,V3ProviderLib}.sol and src/liquidator/V3Liquidator.sol; their interfaces (src/provider/interfaces/IV3*.sol, ISlisBNBV3DexAdapter.sol) stay MIT. The Change License is MIT.