Zap contracts for making multiple Bunni interactions in a single transaction.
This contract is used for adding liquidity to a Bunni pool and then staking it in a gauge. It supports using 0x to perform arbitrary swaps, as well as wrapping ETH to WETH. It uses Multicall to enable performing multiple actions in one transaction.
- Basic LP & stake
- Swap once, LP & stake
- User has only one of the tokens for LPing
- Swap one for the other via 0x, then pair together to LP
- Swap twice, LP & stake
- User has an asset other than the tokens for LPing
- Swap asset for both tokens via 0x, then pair together to LP
- Wrap ETH & XXX
- All the above scenarios can be combined with wrapping ETH to WETH
To install with DappTools:
dapp install timeless-fi/bunni-zap
To install with Foundry:
forge install timeless-fi/bunni-zap
This project uses Foundry as the development framework.
forge install
forge build
forge test -f mainnet
Please create a .env
file before deployment. An example can be found in .env.example
.
forge script script/Deploy.s.sol -f [network]
forge script script/Deploy.s.sol -f [network] --verify --broadcast