Skip to content

Commit

Permalink
chore: bump sor to 4.6.1 - bump sdk-core to 5.8.2 and ur-sdk to 4.4.2 (
Browse files Browse the repository at this point in the history
…#745)

* chore: bump sor to 4.6.1 - bump sdk-core to 5.8.2 and ur-sdk to 4.4.2

* chore: bump sor to 4.6.1 - bump sdk-core to 5.8.2 and ur-sdk to 4.4.2

* revert unintended tenderly changes

* update avax USDC native whale address to make avax USDC -> DAI.e test pass

* 4.6.1

* fix astrochain with smaller quote amount

* fix astrochain quoter address

* fix astrochain usdc whale address
  • Loading branch information
jsy1218 authored Oct 10, 2024
1 parent cf7f746 commit 66927c4
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 50 deletions.
56 changes: 28 additions & 28 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uniswap/smart-order-router",
"version": "4.6.0",
"version": "4.6.1",
"description": "Uniswap Smart Order Router",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down Expand Up @@ -38,11 +38,11 @@
"@uniswap/default-token-list": "^11.13.0",
"@uniswap/permit2-sdk": "^1.3.0",
"@uniswap/router-sdk": "^1.14.0",
"@uniswap/sdk-core": "^5.8.1",
"@uniswap/sdk-core": "^5.8.2",
"@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.3.2",
"@uniswap/universal-router-sdk": "^4.4.2",
"@uniswap/v2-sdk": "^4.6.1",
"@uniswap/v3-sdk": "^3.17.1",
"@uniswap/v4-sdk": "^1.10.0",
Expand Down
10 changes: 5 additions & 5 deletions src/util/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ export const NEW_QUOTER_V2_ADDRESSES: AddressMap = {
[ChainId.WORLDCHAIN]:
CHAIN_TO_ADDRESSES_MAP[ChainId.WORLDCHAIN].quoterAddress, // TODO: deploy view-only-quoter to worldchain
[ChainId.ASTROCHAIN_SEPOLIA]:
CHAIN_TO_ADDRESSES_MAP[ChainId.WORLDCHAIN].quoterAddress, // TODO: deploy view-only-quoter to astrochain
CHAIN_TO_ADDRESSES_MAP[ChainId.ASTROCHAIN_SEPOLIA].quoterAddress, // TODO: deploy view-only-quoter to astrochain
};

export const PROTOCOL_V4_QUOTER_ADDRESSES: AddressMap = {
...constructSameAddressMap('0xf3a39c86dbd13c45365e57fb90fe413371f65af8'),
[ChainId.SEPOLIA]: '0x9336CF25dDad216FD480A5422CBEa7b3BC5bDda8',
[ChainId.SEPOLIA]: CHAIN_TO_ADDRESSES_MAP[ChainId.SEPOLIA].v4QuoterAddress,
};

export const MIXED_ROUTE_QUOTER_V1_ADDRESSES: AddressMap = {
Expand All @@ -111,9 +111,9 @@ export const MIXED_ROUTE_QUOTER_V1_ADDRESSES: AddressMap = {
CHAIN_TO_ADDRESSES_MAP[ChainId.GOERLI].mixedRouteQuoterV1Address,
};

// TODO: use CHAIN_TO_ADDRESSES_MAP[ChainId.GOERLI].mixedRouteQuoterV2Address once sdk-core finalizes deploy addresses
export const MIXED_ROUTE_QUOTER_V2_ADDRESSES: AddressMap = {
[ChainId.SEPOLIA]: '0x4745f77b56a0e2294426e3936dc4fab68d9543cd',
[ChainId.SEPOLIA]:
CHAIN_TO_ADDRESSES_MAP[ChainId.SEPOLIA].mixedRouteQuoterV2Address,
};

export const UNISWAP_MULTICALL_ADDRESSES: AddressMap = {
Expand Down Expand Up @@ -155,7 +155,7 @@ export const SWAP_ROUTER_02_ADDRESSES = (chainId: number): string => {

export const STATE_VIEW_ADDRESSES: AddressMap = {
...constructSameAddressMap('0x1F98415757620B543A52E61c46B32eB19261F984'),
[ChainId.SEPOLIA]: '0x6Bb7157fb50e3Ae4983Ccdc62Fb8173c03c6b0a7',
[ChainId.SEPOLIA]: CHAIN_TO_ADDRESSES_MAP[ChainId.SEPOLIA].v4StateView,
};

export const OVM_GASPRICE_ADDRESS =
Expand Down
24 changes: 12 additions & 12 deletions test/integ/routers/alpha-router/alpha-router.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3652,8 +3652,8 @@ describe('quote for other networks', () => {
const tokenOut = erc1;
const amount = ChainId.ASTROCHAIN_SEPOLIA ?
tradeType == TradeType.EXACT_INPUT ?
parseAmount('0.01', tokenIn):
parseAmount('0.01', tokenOut) :
parseAmount('0.001', tokenIn):
parseAmount('0.001', tokenOut) :
tradeType == TradeType.EXACT_INPUT
? parseAmount('10', tokenIn)
: parseAmount('10', tokenOut);
Expand Down Expand Up @@ -3719,8 +3719,8 @@ describe('quote for other networks', () => {
const exactOutAmount = '1';
const amount = ChainId.ASTROCHAIN_SEPOLIA ?
tradeType == TradeType.EXACT_INPUT ?
parseAmount('0.01', tokenIn):
parseAmount('0.01', tokenOut) :
parseAmount('0.001', tokenIn):
parseAmount('0.001', tokenOut) :
tradeType == TradeType.EXACT_INPUT
? parseAmount('1', tokenIn)
: parseAmount(exactOutAmount, tokenOut);
Expand Down Expand Up @@ -3829,8 +3829,8 @@ describe('quote for other networks', () => {
const exactOutAmount = '1';
const amount = ChainId.ASTROCHAIN_SEPOLIA ?
tradeType == TradeType.EXACT_INPUT ?
parseAmount('0.01', tokenIn):
parseAmount('0.01', tokenOut) :
parseAmount('0.001', tokenIn):
parseAmount('0.001', tokenOut) :
tradeType == TradeType.EXACT_INPUT
? parseAmount('1', tokenIn)
: parseAmount(exactOutAmount, tokenOut);
Expand Down Expand Up @@ -3875,8 +3875,8 @@ describe('quote for other networks', () => {
const exactOutAmount = chain === ChainId.BLAST ? '0.002' : '1';
const amount = ChainId.ASTROCHAIN_SEPOLIA ?
tradeType == TradeType.EXACT_INPUT ?
parseAmount('0.01', tokenIn):
parseAmount('0.01', tokenOut) :
parseAmount('0.001', tokenIn):
parseAmount('0.001', tokenOut) :
tradeType == TradeType.EXACT_INPUT
? parseAmount('1', tokenIn)
: parseAmount(exactOutAmount, tokenOut);
Expand Down Expand Up @@ -3942,7 +3942,7 @@ describe('quote for other networks', () => {
const tokenOut = erc1;
const amount =
tradeType == TradeType.EXACT_INPUT
? parseAmount(chain === ChainId.ZORA || chain === ChainId.WORLDCHAIN || chain === ChainId.ASTROCHAIN_SEPOLIA ? '0.01' : '10', tokenIn)
? parseAmount(chain === ChainId.ZORA || chain === ChainId.WORLDCHAIN || chain === ChainId.ASTROCHAIN_SEPOLIA ? '0.001' : '10', tokenIn)
: parseAmount('10', tokenOut);

// Universal Router is not deployed on Gorli.
Expand Down Expand Up @@ -4149,7 +4149,7 @@ describe('quote for other networks', () => {
const tokenOut = erc2;
const amount =
tradeType === TradeType.EXACT_INPUT
? parseAmount(chain === ChainId.ZORA || chain === ChainId.ASTROCHAIN_SEPOLIA ? '0.01' : '1', tokenIn)
? parseAmount(chain === ChainId.ZORA || chain === ChainId.ASTROCHAIN_SEPOLIA ? '0.001' : '1', tokenIn)
: parseAmount(chain === ChainId.ZORA || chain === ChainId.ASTROCHAIN_SEPOLIA ? '0.001' : '1', tokenOut);

// Universal Router is not deployed on Gorli.
Expand Down Expand Up @@ -4243,7 +4243,7 @@ describe('quote for other networks', () => {
const native = NATIVE_CURRENCY[chain];

it(`${native} -> erc20`, async () => {
if (chain === ChainId.SEPOLIA) {
if (chain === ChainId.SEPOLIA || chain === ChainId.ASTROCHAIN_SEPOLIA) {
// Sepolia doesn't have sufficient liquidity on DAI pools yet
return;
}
Expand All @@ -4254,7 +4254,7 @@ describe('quote for other networks', () => {
const tokenOut = chain == ChainId.BASE || chain == ChainId.ZORA ? USDC_ON(chain) : erc2;
const amount =
tradeType == TradeType.EXACT_INPUT
? parseAmount(chain === ChainId.WORLDCHAIN || chain === ChainId.ASTROCHAIN_SEPOLIA ? '0.001' : '1', tokenIn)
? parseAmount(chain === ChainId.WORLDCHAIN ? '0.001' : '1', tokenIn)
: parseAmount('1', tokenOut);

// Universal Router is not deployed on Gorli.
Expand Down
7 changes: 5 additions & 2 deletions test/test-util/whales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
USDC_ON,
USDC_WORLDCHAIN,
USDC_ZORA,
USDT_MAINNET, V4_SEPOLIA_TEST_A,
USDT_MAINNET,
V4_SEPOLIA_TEST_A,
WETH9,
WLD_WORLDCHAIN,
WNATIVE_ON
Expand Down Expand Up @@ -99,7 +100,7 @@ export const WHALES = (token: Currency): string => {
case USDC_ON(ChainId.AVALANCHE):
return '0x9f8c163cBA728e99993ABe7495F06c0A3c8Ac8b9';
case USDC_NATIVE_AVAX:
return '0x3A2434c698f8D79af1f5A9e43013157ca8B11a66';
return '0x4aeFa39caEAdD662aE31ab0CE7c8C2c9c0a013E8';
case USDC_ON(ChainId.BNB):
return '0x8894E0a0c962CB723c1976a4421c95949bE2D4E3';
case USDC_ON(ChainId.BASE):
Expand All @@ -108,6 +109,8 @@ export const WHALES = (token: Currency): string => {
return '0xbC59f8F3b275AA56A90D13bAE7cCe5e6e11A3b17';
case USDC_NATIVE_BASE:
return '0x20fe51a9229eef2cf8ad9e89d91cab9312cf3b7a';
case USDC_ON(ChainId.ASTROCHAIN_SEPOLIA):
return '0xca8cA8840c77589981E63f4D8122fFEc4b74e2a1';
case DAI_ON(ChainId.GOERLI):
return '0x20918f71e99c09ae2ac3e33dbde33457d3be01f4';
case DAI_ON(ChainId.SEPOLIA):
Expand Down

0 comments on commit 66927c4

Please sign in to comment.