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

Commit

Permalink
fix: update factory address to use sdk core (#159)
Browse files Browse the repository at this point in the history
* update factory address to use sdk core

* Fix code style issues with Prettier

* bump v2-sdk to 4.1.1

* yarn lock

* merge conflict

---------

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Miguel Cervera <miguel.cervera@uniswap.org>
  • Loading branch information
3 people authored Feb 23, 2024
1 parent bf68bb1 commit 038c838
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@ethersproject/address": "^5.0.0",
"@ethersproject/solidity": "^5.0.0",
"@uniswap/sdk-core": "^4.0.7",
"@uniswap/sdk-core": "^4.1.3",
"tiny-invariant": "^1.1.0",
"tiny-warning": "^1.0.3"
},
Expand Down
25 changes: 2 additions & 23 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
import { Percent } from '@uniswap/sdk-core'
import { Percent, V2_FACTORY_ADDRESSES } from '@uniswap/sdk-core'
import JSBI from 'jsbi'

/**
* @deprecated use FACTORY_ADDRESS_MAP instead
*/
export const FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f'

export const FACTORY_ADDRESS_MAP: { [chainId: number]: string } = {
// Mainnet
1: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f',
// Ropsten
3: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f',
// Goerli
5: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f',
// Optimism
10: '0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf',
// Arbitrum
42161: '0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9',
// Avalanche
43114: '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C',
// Base
8453: '0x8909dc15e40173ff4699343b6eb8132c65e18ec6',
// BNB
56: '0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6',
// Polygon
137: '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C',
// Celo
42220: '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f'
}
export const FACTORY_ADDRESS_MAP: { [chainId: number]: string } = V2_FACTORY_ADDRESSES

export const INIT_CODE_HASH = '0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f'

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1706,10 +1706,10 @@
semver "^7.3.2"
tsutils "^3.17.1"

"@uniswap/sdk-core@^4.0.7":
version "4.0.7"
resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-4.0.7.tgz#90dfd070d7e44494234618af398da158363ae827"
integrity sha512-jscx7KUIWzQatcL5PHY6xy0gEL9IGQcL5h/obxzX9foP2KoNk9cq66Ia8I2Kvpa7zBcPOeW1hU0hJNBq6CzcIQ==
"@uniswap/sdk-core@^4.1.3":
version "4.1.3"
resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-4.1.3.tgz#5db8c527eee89ac2467fa327bd42f0f17aee76ac"
integrity sha512-dbXX4Ivam5D90gwiT0MWgHSiKdl99rC0GiPcK8Pd+iFp2myypPX9ovTR3IncI3Y83mZrlBLX9XC1Q6kA/12hOg==
dependencies:
"@ethersproject/address" "^5.0.2"
big.js "^5.2.2"
Expand Down

0 comments on commit 038c838

Please sign in to comment.