/test

Foundry Contracts

structure
test/foundry-contracts/aggregator
└── Contract.t.sol

Foundry testing scripts that run fuzz and static tests on the smart contracts. They run on a forked network.

Helper

structure
test/helper
├── provider.test.ts
└── token_misc.test.ts

Tests the provider and token_misc scripts by checking if the functions validate the .env for keys, rpc urls, etc. Token misc checks if the event listening works correctly.

Message Aggregator

structure
test/message-aggregators/aggregator
├── Deploy Contract.test.ts
└── Transaction Sender.test.ts

These contain the runners for deploying contracts and sending transactions by interacting with the scripts in Message Aggregators. By default they are set to test, which only interact on a local fork. Setting the mode to "broadcast" will execute on a live network.

Token Aggregator

structure
test/token-aggregators/token-aggregator
├── Route Executor.test.ts
└── Route Builder.test.ts

route builder creates routes by calling the route_builder scripts from Token Aggregators. They contain different token pairs and values to trade on, notably all of them have a 1 ETH/WETH to USDC on same and cross-chain wherever applicable. They also store the quotes generated Run-data.

The execute route runs the functions that sign a transaction and submit a swap. By default the submit transactions are skipped so as to not using the user's funds.

Last updated

Was this helpful?