Skip to content

Commit

Permalink
feat(breaking): remove PERMIT2_ADDRESS constant from universal-router…
Browse files Browse the repository at this point in the history
…-sdk (#43)

## Description

Remove `PERMIT2_ADDRESS` constant from ur-sdk, and reference to permit2-sdk as the only source of truth.

intentionally breaking

## How Has This Been Tested?

Existing unit tests

## Are there any breaking changes?

No

## (Optional) Feedback Focus

No

## (Optional) Follow Ups

No
  • Loading branch information
jsy1218 authored Oct 2, 2024
1 parent b637f99 commit 3c14aee
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion sdks/universal-router-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export { RoutePlanner, CommandType } from './utils/routerCommands'
export {
UNIVERSAL_ROUTER_CREATION_BLOCK,
UNIVERSAL_ROUTER_ADDRESS,
PERMIT2_ADDRESS,
ROUTER_AS_RECIPIENT,
WETH_ADDRESS,
UniversalRouterVersion,
Expand Down
2 changes: 0 additions & 2 deletions sdks/universal-router-sdk/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,6 @@ export const WETH_ADDRESS = (chainId: number): string => {
return CHAIN_CONFIGS[chainId].weth
}

export const PERMIT2_ADDRESS = '0x000000000022D473030F116dDEE9F6B43aC78BA3'

export const CONTRACT_BALANCE = BigNumber.from(2).pow(255)
export const ETH_ADDRESS = '0x0000000000000000000000000000000000000000'
export const E_ETH_ADDRESS = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
Expand Down
2 changes: 1 addition & 1 deletion sdks/universal-router-sdk/test/utils/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const TEST_RECIPIENT_ADDRESS = '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
export const TEST_FEE_RECIPIENT_ADDRESS = '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'

export const PERMIT2_ADDRESS =
process.env.USE_MAINNET_DEPLOYMENT === 'true' ? MAINNET_PERMIT2_ADDRESS : FORGE_PERMIT2_ADDRESS
process.env.USE_MAINNET_DEPLOYMENT === 'true' ? permit2Address(ChainId.MAINNET) : FORGE_PERMIT2_ADDRESS
// Universal Router address in tests
export const ROUTER_ADDRESS =
process.env.USE_MAINNET_DEPLOYMENT === 'true' ? MAINNET_ROUTER_ADDRESS : FORGE_ROUTER_ADDRESS

0 comments on commit 3c14aee

Please sign in to comment.