Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsv committed Feb 12, 2025
2 parents fabd94f + 353311d commit 8511e94
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 150 deletions.
118 changes: 27 additions & 91 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -335,7 +335,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -370,7 +370,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -406,7 +406,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -442,7 +442,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -478,7 +478,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -513,7 +513,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -549,7 +549,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -584,7 +584,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -619,7 +619,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -637,6 +637,7 @@ jobs:
run: npm run integ-test -- -t 'quote for other networks * base'
env:
JSON_RPC_PROVIDER_BASE: ${{ secrets.JSON_RPC_PROVIDER_BASE }}
JSON_RPC_PROVIDER_BASE_SEPOLIA: ${{ secrets.JSON_RPC_PROVIDER_BASE_SEPOLIA }}
TENDERLY_BASE_URL: ${{ secrets.TENDERLY_BASE_URL }}
TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
Expand All @@ -654,7 +655,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -689,7 +690,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -724,7 +725,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -758,7 +759,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -791,7 +792,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -809,38 +810,6 @@ jobs:
env:
# 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:
JSON_RPC_PROVIDER_UNICHAIN_SEPOLIA: ${{ secrets.JSON_RPC_PROVIDER_UNICHAIN_SEPOLIA }}
TENDERLY_BASE_URL: ${{ secrets.TENDERLY_BASE_URL }}
TENDERLY_USER: ${{ secrets.TENDERLY_USER }}
Expand All @@ -858,7 +827,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -880,39 +849,6 @@ jobs:
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}

integration-tests-quote-for-other-networks-base-sepolia:
name: Integration Tests - Quote For Other Networks Base 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 * base sepolia'
env:
JSON_RPC_PROVIDER_MONAD_TESTNET: ${{ secrets.JSON_RPC_PROVIDER_BASE_SEPOLIA }}
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-remaining-networks:
name: Integration Tests - Quote For Other Networks Remaining Networks
runs-on: ubuntu-latest
Expand All @@ -924,7 +860,7 @@ jobs:
node-version: 18.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -940,7 +876,7 @@ jobs:

# This is to capture any new networks added into the integ-test suite
- name: Run Integration tests
run: npm run integ-test -- -t 'quote for other networks * (?!(mainnet|optimism|arbitrum|polygon|sepolia|celo|bnb|avalanche|base|blast|zora|zksync|worldchain|UNICHAIN-sepolia|monad-testnet|base-sepolia))'
run: npm run integ-test -- -t 'quote for other networks * (?!(mainnet|optimism|arbitrum|polygon|sepolia|celo|bnb|avalanche|base|blast|zora|zksync|worldchain|unichain|monad-testnet))'
env:
# We don't know which new networks will be added, so we have no way to provider RPC URL ahead of time
# This will make remaining networks integ-test suite to fail, and dev is expected to manually add RPC URL for the new network
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions src/providers/tenderly-simulation-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ const TENDERLY_NODE_API = (chainId: ChainId, tenderlyNodeApiKey: string) => {
return `https://blast.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.WORLDCHAIN:
return `https://worldchain-mainnet.gateway.tenderly.co/${tenderlyNodeApiKey}`;
case ChainId.UNICHAIN:
return `https://unichain.gateway.tenderly.co/${tenderlyNodeApiKey}`;
default:
throw new Error(
`ChainId ${chainId} does not correspond to a tenderly node endpoint`
Expand Down
10 changes: 10 additions & 0 deletions src/providers/token-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@ export const DAI_POLYGON = new Token(
'Dai Stablecoin'
);

export const DAI_BASE_SEPOLIA = new Token(
ChainId.SEPOLIA,
'0xE6F6e27c0BF1a4841E3F09d03D7D31Da8eAd0a27',
18,
'DAI',
'Dai Stablecoin'
);

//polygon mumbai tokens
export const WMATIC_POLYGON_MUMBAI = new Token(
ChainId.POLYGON_MUMBAI,
Expand Down Expand Up @@ -1013,6 +1021,8 @@ export const DAI_ON = (chainId: ChainId): Token => {
return DAI_ZKSYNC;
case ChainId.UNICHAIN:
return DAI_UNICHAIN;
case ChainId.BASE_SEPOLIA:
return DAI_BASE_SEPOLIA;
default:
throw new Error(`Chain id: ${chainId} not supported`);
}
Expand Down
Loading

0 comments on commit 8511e94

Please sign in to comment.