Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sor): support routing on unichain mainnet #766

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,8 @@ jobs:
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}

integration-tests-quote-for-other-networks-astrochain:
name: Integration Tests - Quote For Other Networks AstroChain
integration-tests-quote-for-other-networks-unichain:
name: Integration Tests - Quote For Other Networks Unichain
runs-on: ubuntu-latest

steps:
Expand All @@ -805,9 +805,44 @@ jobs:
run: npm run build

- name: Run Integration tests
run: npm run integ-test -- -t 'quote for other networks * astrochain'
run: npm run integ-test -- -t 'quote for other networks * unichain'
env:
JSON_RPC_PROVIDER_ASTROCHAIN_SEPOLIA: ${{ secrets.JSON_RPC_PROVIDER_ASTROCHAIN_SEPOLIA }}
# TODO: add secret in github secrets
JSON_RPC_PROVIDER_UNICHAIN: ${{ secrets.JSON_RPC_PROVIDER_UNICHAIN }}
TENDERLY_BASE_URL: ${{ secrets.TENDERLY_BASE_URL }}
TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}

integration-tests-quote-for-other-networks-unichain-sepolia:
name: Integration Tests - Quote For Other Networks Unichain Sepolia
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install

# This is required separately from yarn test because it generates the typechain definitions
- name: Compile
run: npm run build

- name: Run Integration tests
run: npm run integ-test -- -t 'quote for other networks * unichain sepolia'
env:
# TODO: add secret in github secrets, similar value to 'JSON_RPC_PROVIDER_ASTROCHAIN_SEPOLIA'
JSON_RPC_PROVIDER_UNICHAIN_SEPOLIA: ${{ secrets.JSON_RPC_PROVIDER_UNICHAIN_SEPOLIA }}
TENDERLY_BASE_URL: ${{ secrets.TENDERLY_BASE_URL }}
TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ Total ticks crossed: 7
./bin/cli quote --tokenIn 0x4200000000000000000000000000000000000006 --tokenOut 0x31d0220469e10c4E71834a79b1f276d740d3768F --amount 0.1 --exactIn --minSplits 1 --protocols v3 --router alpha --chainId 1301
```

## Unichain Mainnet

```
./bin/cli quote --tokenIn 0x4200000000000000000000000000000000000006 --tokenOut 0x???????????????????????????? --amount 0.1 --exactIn --minSplits 1 --protocols v3 --router alpha --chainId 130
```

## Adding a new Chain

The main components to complete are:
Expand Down
170 changes: 67 additions & 103 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
"@types/brotli": "^1.3.4",
"@uniswap/default-token-list": "^11.13.0",
"@uniswap/permit2-sdk": "^1.3.0",
"@uniswap/router-sdk": "^1.14.0",
"@uniswap/sdk-core": "^5.9.0",
"@uniswap/router-sdk": "^1.15.0",
"@uniswap/sdk-core": "^6.0.0",
"@uniswap/swap-router-contracts": "^1.3.1",
"@uniswap/token-lists": "^1.0.0-beta.31",
"@uniswap/universal-router": "^1.6.0",
"@uniswap/universal-router-sdk": "^4.6.1",
"@uniswap/v2-sdk": "^4.6.1",
"@uniswap/v3-sdk": "^3.17.1",
"@uniswap/v4-sdk": "^1.10.0",
"@uniswap/universal-router-sdk": "file:/tmp/ur-sdk-001.tgz",
xrsv marked this conversation as resolved.
Show resolved Hide resolved
"@uniswap/v2-sdk": "^4.7.0",
"@uniswap/v3-sdk": "^3.19.0",
"@uniswap/v4-sdk": "^1.12.0",
"async-retry": "^1.3.1",
"await-timeout": "^1.1.1",
"axios": "^0.21.1",
Expand Down
Loading
Loading