Skip to content

Commit

Permalink
[Docs] Added section in README on how to add a new chain to SOR (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
raghava-pamula authored Jul 14, 2022
1 parent 3c4a32f commit 55c45c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,17 @@ Calldata: 0x414bf389000000000000000000000000dac17f958d2ee523a2206206994597c13d83
```
./bin/cli quote --tokenIn 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 --tokenOut 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619 --amount 5 --exactIn --minSplits 1 --protocols v3 --router alpha --chainId 137
```

## Adding a new Chain
The main components to complete are:
* Deploy contracts on chain, add the pools to subgraph
* Populate v3 providers in `src/providers/v3/subgraph-provider` and `src/providers/v3/static-subgraph-provider`
* Populate chainId and addresses in `src/util/chains.ts` and `src/util/addresses.ts`
* Populate token providers in `src/providers/caching-token-provider` and `src/providers/token-provider.ts`
* Populate gas constants in `src/routers/alpha-router/gas-models/*`
* Populate bases in `src/routers/legacy-router/bases.ts`
* Populate `test/integ/routers/alpha-router/alpha-router.integration.test.ts` and `src/providers/v2/static-subgraph-provider.ts`
* Populate `src/routers/alpha-router/*`
* Add a log to `/CHANGELOG.md`
* Run `npm run integ-test` successfully

0 comments on commit 55c45c9

Please sign in to comment.