Skip to content

Commit 8bc96d7

Browse files
committed
pin all package versions
1 parent f9a538f commit 8bc96d7

File tree

7 files changed

+192
-134
lines changed

7 files changed

+192
-134
lines changed

examples/sweeper/src/utils.ts

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import { ethers } from "ethers";
2-
import { ChainId, Token } from "@uniswap/sdk-core";
2+
import { Token } from "@uniswap/sdk-core";
3+
4+
// Prefer numeric chain IDs now that ChainId enum is gone.
5+
6+
const CHAIN = {
7+
MAINNET: 1,
8+
GOERLI: 5,
9+
SEPOLIA: 11155111,
10+
} as const;
311

412
// Environment
513

@@ -11,51 +19,51 @@ export enum Environment {
1119
// Currencies and Tokens
1220

1321
export const WETH_TOKEN_MAINNET = new Token(
14-
ChainId.MAINNET,
22+
CHAIN.MAINNET,
1523
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
1624
18,
1725
"WETH",
18-
"Wrapped Ether",
26+
"Wrapped Ether"
1927
);
2028

2129
export const WETH_TOKEN_GOERLI = new Token(
22-
ChainId.GOERLI,
30+
CHAIN.GOERLI,
2331
"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
2432
18,
2533
"WETH",
26-
"Wrapped Ether",
34+
"Wrapped Ether"
2735
);
2836

2937
export const USDC_TOKEN_MAINNET = new Token(
30-
ChainId.MAINNET,
38+
CHAIN.MAINNET,
3139
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
3240
6,
3341
"USDC",
34-
"USD//C",
42+
"USD//C"
3543
);
3644

3745
export const USDC_TOKEN_GOERLI = new Token(
38-
ChainId.GOERLI,
46+
CHAIN.GOERLI,
3947
"0x07865c6E87B9F70255377e024ace6630C1Eaa37F",
4048
6,
4149
"USDC",
42-
"USD//C",
50+
"USD//C"
4351
);
4452

4553
export const UNI_TOKEN_MAINNET = new Token(
46-
ChainId.MAINNET,
54+
CHAIN.MAINNET,
4755
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
4856
18,
4957
"UNI",
50-
"Uniswap",
58+
"Uniswap"
5159
);
5260

5361
export const UNI_TOKEN_GOERLI = new Token(
54-
ChainId.GOERLI,
62+
CHAIN.GOERLI,
5563
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
5664
18,
5765
"UNI",
58-
"Uniswap",
66+
"Uniswap"
5967
);
6068

6169
// ABIs
@@ -85,7 +93,7 @@ export function fromReadableAmount(amount: number, decimals: number): bigint {
8593
export function toReadableAmount(
8694
rawAmount: number | string,
8795
decimals: number,
88-
maxDecimals = MAX_DECIMALS,
96+
maxDecimals = MAX_DECIMALS
8997
): string {
9098
return ethers.formatUnits(rawAmount, decimals).slice(0, maxDecimals);
9199
}

examples/trading-runner/src/uniswap/constants.ts

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
// This file stores web3 related constants such as addresses, token definitions, ETH currency references and ABIs
22

33
import { FeeAmount } from "@uniswap/v3-sdk";
4-
import { ChainId, Token, Percent } from "@uniswap/sdk-core";
4+
import { Token, Percent } from "@uniswap/sdk-core";
55
import uniV3UniversalRouterContractABI from "./abi/univ3-universal-router-contract-abi.json";
66
import wethContractABI from "./abi/weth-contract-abi.json";
77

8+
// Prefer numeric chain IDs now that ChainId enum is gone.
9+
10+
const CHAIN = {
11+
MAINNET: 1,
12+
GOERLI: 5,
13+
SEPOLIA: 11155111,
14+
} as const;
15+
816
// Environment
917

1018
export enum Environment {
@@ -65,51 +73,51 @@ export const UNI_V3_UNIVERSAL_ROUTER_CONTRACT_ABI =
6573
// Currencies and Tokens
6674

6775
export const WETH_TOKEN_MAINNET = new Token(
68-
ChainId.MAINNET,
76+
CHAIN.MAINNET,
6977
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
7078
18,
7179
"WETH",
72-
"Wrapped Ether",
80+
"Wrapped Ether"
7381
);
7482

7583
export const WETH_TOKEN_GOERLI = new Token(
76-
ChainId.GOERLI,
84+
CHAIN.GOERLI,
7785
"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
7886
18,
7987
"WETH",
80-
"Wrapped Ether",
88+
"Wrapped Ether"
8189
);
8290

8391
export const USDC_TOKEN_MAINNET = new Token(
84-
ChainId.MAINNET,
92+
CHAIN.MAINNET,
8593
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
8694
6,
8795
"USDC",
88-
"USD//C",
96+
"USD//C"
8997
);
9098

9199
export const USDC_TOKEN_GOERLI = new Token(
92-
ChainId.GOERLI,
100+
CHAIN.GOERLI,
93101
"0x07865c6E87B9F70255377e024ace6630C1Eaa37F",
94102
6,
95103
"USDC",
96-
"USD//C",
104+
"USD//C"
97105
);
98106

99107
export const UNI_TOKEN_MAINNET = new Token(
100-
ChainId.MAINNET,
108+
CHAIN.MAINNET,
101109
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
102110
18,
103111
"UNI",
104-
"Uniswap",
112+
"Uniswap"
105113
);
106114

107115
export const UNI_TOKEN_GOERLI = new Token(
108-
ChainId.GOERLI,
116+
CHAIN.GOERLI,
109117
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
110118
18,
111119
"UNI",
112-
"Uniswap",
120+
"Uniswap"
113121
);
114122

115123
export const ASSET_METADATA: { [key: string]: { [key: string]: any } } = {

examples/with-uniswap/src/constants.ts

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
// This file stores web3 related constants such as addresses, token definitions, ETH currency references and ABIs
22

3-
import { ChainId, Token } from "@uniswap/sdk-core";
3+
import { Token } from "@uniswap/sdk-core";
44
import uniV3UniversalRouterContractABI from "./abi/univ3-universal-router-contract-abi.json";
55
import wethContractABI from "./abi/weth-contract-abi.json";
66

7+
// Prefer numeric chain IDs now that ChainId enum is gone.
8+
9+
const CHAIN = {
10+
MAINNET: 1,
11+
GOERLI: 5,
12+
SEPOLIA: 11155111,
13+
} as const;
14+
715
// Environment
816

917
export enum Environment {
@@ -30,51 +38,51 @@ export const UNI_V3_UNIVERSAL_ROUTER_CONTRACT_ADDRESS_GOERLI =
3038
// Currencies and Tokens
3139

3240
export const WETH_TOKEN_MAINNET = new Token(
33-
ChainId.MAINNET,
41+
CHAIN.MAINNET,
3442
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
3543
18,
3644
"WETH",
37-
"Wrapped Ether",
45+
"Wrapped Ether"
3846
);
3947

4048
export const WETH_TOKEN_GOERLI = new Token(
41-
ChainId.GOERLI,
49+
CHAIN.GOERLI,
4250
"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
4351
18,
4452
"WETH",
45-
"Wrapped Ether",
53+
"Wrapped Ether"
4654
);
4755

4856
export const USDC_TOKEN_MAINNET = new Token(
49-
ChainId.MAINNET,
57+
CHAIN.MAINNET,
5058
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
5159
6,
5260
"USDC",
53-
"USD//C",
61+
"USD//C"
5462
);
5563

5664
export const USDC_TOKEN_GOERLI = new Token(
57-
ChainId.GOERLI,
65+
CHAIN.GOERLI,
5866
"0x07865c6E87B9F70255377e024ace6630C1Eaa37F",
5967
6,
6068
"USDC",
61-
"USD//C",
69+
"USD//C"
6270
);
6371

6472
export const UNI_TOKEN_MAINNET = new Token(
65-
ChainId.MAINNET,
73+
CHAIN.MAINNET,
6674
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
6775
18,
6876
"UNI",
69-
"Uniswap",
77+
"Uniswap"
7078
);
7179

7280
export const UNI_TOKEN_GOERLI = new Token(
73-
ChainId.GOERLI,
81+
CHAIN.GOERLI,
7482
"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
7583
18,
7684
"UNI",
77-
"Uniswap",
85+
"Uniswap"
7886
);
7987

8088
// ABIs

packages/sdk-react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"peerDependencies": {
5959
"@types/react": ">=16.8.0 <20",
60-
"react": "16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
60+
"react": ">=18.2 <19",
6161
"react-native": "0.76.5",
6262
"react-native-keychain": "8.1.0",
6363
"react-native-inappbrowser-reborn": "3.7.0",

packages/sdk-react/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,30 @@
5959
"@react-oauth/google": "0.12.1",
6060
"@turnkey/crypto": "workspace:*",
6161
"@turnkey/sdk-browser": "workspace:*",
62-
"@turnkey/sdk-types": "workspace:*",
6362
"@turnkey/sdk-server": "workspace:*",
63+
"@turnkey/sdk-types": "workspace:*",
6464
"@turnkey/wallet-stamper": "workspace:*",
6565
"jwt-decode": "4.0.0",
6666
"libphonenumber-js": "1.11.14",
67-
"next": "15.2.3 ",
67+
"next": "15.2.3",
6868
"react-apple-login": "1.1.6",
6969
"react-international-phone": "4.3.0",
7070
"usehooks-ts": "3.1.1"
7171
},
7272
"peerDependencies": {
73-
"@types/react": ">=18.2.75 <20",
74-
"react": "16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
73+
"react": "^18.3.1 || ^19.0.0",
74+
"react-dom": "^18.3.1 || ^19.0.0",
75+
"@types/react": ">=18.2.0 <20"
7576
},
7677
"peerDependenciesMeta": {
7778
"@types/react": {
7879
"optional": true
7980
}
8081
},
8182
"devDependencies": {
82-
"postcss-import": "16.1.0",
83-
"react": "18.2.0"
83+
"react": "19.0.0",
84+
"react-dom": "19.0.0",
85+
"postcss-import": "16.1.0"
8486
},
8587
"engines": {
8688
"node": ">=18.0.0"

packages/viem/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"compile:contracts": "hardhat compile"
5454
},
5555
"peerDependencies": {
56-
"viem": "1.16.6 || ^2.24.2"
56+
"viem": ">=2.24.2 <3"
5757
},
5858
"dependencies": {
5959
"@noble/curves": "1.8.0",

0 commit comments

Comments
 (0)