Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
fix: add correct addresses for sepolia (#119)
Browse files Browse the repository at this point in the history
* fix: add correct addresses for sepolia

* Fixed bug that returned an empty swap router 02 address for base chain (#120)

* Updated code to correctly access addresses

* add test to ensure no regression

---------

Co-authored-by: jsy1218 <[email protected]>

* Fix code style issues with Prettier

* enhance testing coverage

* Fix code style issues with Prettier

---------

Co-authored-by: dallinlarsen <[email protected]>
Co-authored-by: jsy1218 <[email protected]>
Co-authored-by: Lint Action <[email protected]>
  • Loading branch information
4 people authored Feb 23, 2024
1 parent 581a0c8 commit 2b653b4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
15 changes: 15 additions & 0 deletions src/addresses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,20 @@ describe('addresses', () => {
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.BNB)
expect(address).toEqual('0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2')
})

it('should return the correct address for arbitrum goerli', () => {
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.ARBITRUM_GOERLI)
expect(address).toEqual('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45')
})

it('should return the correct address for optimism sepolia', () => {
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.OPTIMISM_SEPOLIA)
expect(address).toEqual('0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4')
})

it('should return the correct address for sepolia', () => {
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.SEPOLIA)
expect(address).toEqual('0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E')
})
})
})
9 changes: 6 additions & 3 deletions src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ const OPTIMISM_SEPOLIA_ADDRESSES: ChainAddresses = {
quoterAddress: '0x0FBEa6cf957d95ee9313490050F6A0DA68039404',
v3MigratorAddress: '0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07',
nonfungiblePositionManagerAddress: '0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d',
tickLensAddress: '0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5'
tickLensAddress: '0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5',
swapRouter02Address: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4'
}

// arbitrum goerli v3 addresses
Expand All @@ -147,7 +148,8 @@ const ARBITRUM_SEPOLIA_ADDRESSES: ChainAddresses = {
quoterAddress: '0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B',
v3MigratorAddress: '0x398f43ef2c67B941147157DA1c5a868E906E043D',
nonfungiblePositionManagerAddress: '0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65',
tickLensAddress: '0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9'
tickLensAddress: '0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9',
swapRouter02Address: '0x101F443B4d1b059569D643917553c771E1b9663E'
}

// sepolia v3 addresses
Expand All @@ -157,7 +159,8 @@ const SEPOLIA_ADDRESSES: ChainAddresses = {
quoterAddress: '0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3',
v3MigratorAddress: '0x729004182cF005CEC8Bd85df140094b6aCbe8b15',
nonfungiblePositionManagerAddress: '0x1238536071E1c677A632429e3655c799b22cDA52',
tickLensAddress: '0xd7f33bcdb21b359c8ee6f0251d30e94832baad07'
tickLensAddress: '0xd7f33bcdb21b359c8ee6f0251d30e94832baad07',
swapRouter02Address: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E'
}

// Avalanche v3 addresses
Expand Down

0 comments on commit 2b653b4

Please sign in to comment.