Repo for peanut smart contracts
If you find any vulnerabilities, please report them to us asap. We have a bug bounty program and a history of payouts! More info here: https://docs.peanut.to/other/bug-bounties
See list of deployed contracts on contracts.json
See deploy.py
for deploying more
For zksync, see subfolder zksync-era
forge install
forge test
Single test:
forge test --match-path test/V4/testX** -vvvv
Test on Fork:
forge test --fork-url "https://ethereum-goerli.publicnode.com" --match-path test/V4/testWithdrawDepositXChain** -vvvv
Use deploy.py
for simplicity.
Alternatively: forge create...
or forge script
e.g. (optional params)
forge script script/DeployEthRome.s.sol:DeployEthRome --rpc-url optimism-goerli --broadcast --verify -vvvv --legacy
e.g. verify contract:
forge verify-contract 0x690481ce72b1080bd928a35a0ecf329be902cd6a src/V4/PeanutV4.2.sol:PeanutV4 --watch --chain base
forge verify-contract 0xBF9688FF5302Ad722343140cEd16EBE30db86c25 src/V4/PeanutRouter.sol:PeanutV4Router --watch --chain polygon