- bun install
- anvil, start local chain environment
- Test
- forge test --match-path test/CryptoSwap.t.sol --fork-url http://localhost:8545 -vv
- forge test --match-test test_settle --fork-url http://localhost:8545 -vv
- forge test --match-test test_SettleCase --fork-url http://localhost:8545 -vv
- forge test --match-contract CryptoSwapTestFork (should config API_KEY_ALCHEMY in env )
- Deploy
- forge script script/DeployMockContracts.sol --rpc-url sepolia --broadcast --verify -vvvv
-
DealEngine
- the rules
- check profit different scenarios
- add different notional. like 100,1000,
- supply 5*notional
-
More, check https://github.com/sodexx7/BlockMagic_Swap/blob/equitySwapDraft/test/EquitySwap.t.sol#L184