From 3e162c705ed840042b8d41bc12c52aad30177713 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:24:48 +0800 Subject: [PATCH 01/15] Support Darwinia of sdk-core --- sdks/sdk-core/src/addresses.ts | 8 ++++++++ sdks/sdk-core/src/chains.ts | 5 +++++ sdks/sdk-core/src/entities/ether.ts | 7 +++++++ sdks/sdk-core/src/entities/weth9.ts | 2 ++ 4 files changed, 22 insertions(+) diff --git a/sdks/sdk-core/src/addresses.ts b/sdks/sdk-core/src/addresses.ts index 5fbda702a..162161e85 100644 --- a/sdks/sdk-core/src/addresses.ts +++ b/sdks/sdk-core/src/addresses.ts @@ -250,6 +250,13 @@ const BITLAYER_ADDRESSES: ChainAddresses = { nonfungiblePositionManagerAddress: '0xFBAD806Bdf9cEC2943be281FB355Da05068DE925', } +const DARWINIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0xF118eAEcCFc037986D08A6CBC97A4F2C8de9108e', + multicallAddress: '0xD1167316a70d5566ED18BCfe1e265D59338447bE', + quoterAddress: '0x54692837aC72A54d38069Ac6Ec8c4C56590e8679', + nonfungiblePositionManagerAddress: '0x00DEba7612403e8bDa0b82186548EE59C86CBf98', +} + export const CHAIN_TO_ADDRESSES_MAP: Record = { [ChainId.MAINNET]: MAINNET_ADDRESSES, [ChainId.OPTIMISM]: OPTIMISM_ADDRESSES, @@ -274,6 +281,7 @@ export const CHAIN_TO_ADDRESSES_MAP: Record [ChainId.BLAST]: BLAST_ADDRESSES, [ChainId.BITLAYER_TESTNET]: BITLAYER_TESTNET_ADDRESSES, [ChainId.BITLAYER]: BITLAYER_ADDRESSES, + [ChainId.DARWINIA]: DARWINIA_ADDRESSES, } /* V3 Contract Addresses */ diff --git a/sdks/sdk-core/src/chains.ts b/sdks/sdk-core/src/chains.ts index 7dbc6126f..fe6021385 100644 --- a/sdks/sdk-core/src/chains.ts +++ b/sdks/sdk-core/src/chains.ts @@ -24,6 +24,7 @@ export enum ChainId { BLAST = 81457, BITLAYER_TESTNET = 200810, BITLAYER = 200901, + DARWINIA = 46, } export const SUPPORTED_CHAINS = [ @@ -50,6 +51,7 @@ export const SUPPORTED_CHAINS = [ ChainId.BLAST, ChainId.BITLAYER_TESTNET, ChainId.BITLAYER, + ChainId.DARWINIA, ] as const export type SupportedChainsType = (typeof SUPPORTED_CHAINS)[number] @@ -62,10 +64,13 @@ export enum NativeCurrencyName { MOONBEAM = 'GLMR', BNB = 'BNB', AVAX = 'AVAX', + BTC = 'BTC', + RING = 'RING', // ROOTSTOCK = 'RBTC', } export const CHAINS_SUPPORTED_BY_HELIXSWAP = [ ChainId.BITLAYER_TESTNET, ChainId.BITLAYER, + ChainId.DARWINIA, ] diff --git a/sdks/sdk-core/src/entities/ether.ts b/sdks/sdk-core/src/entities/ether.ts index 66c1c5b8e..56c8859eb 100644 --- a/sdks/sdk-core/src/entities/ether.ts +++ b/sdks/sdk-core/src/entities/ether.ts @@ -4,11 +4,18 @@ import { NativeCurrency } from './nativeCurrency' import { Token } from './token' import { WETH9 } from './weth9' +/** + * Specify the symbol and name of specific chains + * @param chainId Chain ID of the chain + * @returns [Symbol, Name] + */ function getSymbolAndName(chainId: number) { switch (chainId) { case 200810: case 200901: return ['BTC', 'BTC'] + case 46: + return ['RING', 'RING'] default: return ['ETH', 'Ether'] } diff --git a/sdks/sdk-core/src/entities/weth9.ts b/sdks/sdk-core/src/entities/weth9.ts index fe8a395d0..eee0d58e0 100644 --- a/sdks/sdk-core/src/entities/weth9.ts +++ b/sdks/sdk-core/src/entities/weth9.ts @@ -28,4 +28,6 @@ export const WETH9: { [chainId: number]: Token } = { 200810: new Token(200810, '0x5F8D4232367759bCe5d9488D3ade77FCFF6B9b6B', 18, 'WBTC', 'Wrapped BTC'), // Bitlayer 200901: new Token(200901, '0xfF204e2681A6fA0e2C3FaDe68a1B28fb90E4Fc5F', 18, 'WBTC', 'Wrapped BTC'), + // Darwinia + 46: new Token(46, '0xE7578598Aac020abFB918f33A20faD5B71d670b4', 18, 'WRING', 'Wrapped RING'), } From dc3f699176bef8e3976bdd56036371c4d1fbb2df Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:26:16 +0800 Subject: [PATCH 02/15] Bump version of sdk-core --- sdks/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/sdk-core/package.json b/sdks/sdk-core/package.json index 3ef7b60a6..8bee9cd92 100644 --- a/sdks/sdk-core/package.json +++ b/sdks/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@helix-bridge/sdk-core", - "version": "1.0.5", + "version": "1.1.0", "description": "⚒️ An SDK for building applications on top of Uniswap V3", "repository": "https://github.com/Uniswap/sdks.git", "keywords": [ From 67ed5187851b4b9befb71d3aca6418792df557e6 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:27:32 +0800 Subject: [PATCH 03/15] Publish sdk-core --- .github/workflows/release-packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index 1d1b7b064..3a0c83bcc 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -31,15 +31,15 @@ jobs: - name: Build packages # run: yarn g:build run: | - yarn sdk @helix-bridge/universal-router-sdk build + yarn sdk @helix-bridge/sdk-core build - name: Publish to GitHub Packages run: | - npm publish -w @helix-bridge/universal-router-sdk + npm publish -w @helix-bridge/sdk-core + # npm publish -w @helix-bridge/universal-router-sdk # npm publish -w @helix-bridge/uniswapx-sdk # npm publish -w @helix-bridge/router-sdk # npm publish -w @helix-bridge/v2-sdk # npm publish -w @helix-bridge/v3-sdk - # npm publish -w @helix-bridge/sdk-core env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From d26534f54505f4acb6604be79dde37e439dc444a Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:37:00 +0800 Subject: [PATCH 04/15] Supported of v2-sdk and v3-sdk --- sdks/v2-sdk/package.json | 2 +- sdks/v3-sdk/package.json | 2 +- yarn.lock | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/sdks/v2-sdk/package.json b/sdks/v2-sdk/package.json index 833e93f48..9698bc8a0 100644 --- a/sdks/v2-sdk/package.json +++ b/sdks/v2-sdk/package.json @@ -27,7 +27,7 @@ "dependencies": { "@ethersproject/address": "^5.0.2", "@ethersproject/solidity": "^5.0.9", - "@helix-bridge/sdk-core": "1.0.5", + "@helix-bridge/sdk-core": "1.1.0", "tiny-invariant": "^1.1.0", "tiny-warning": "^1.0.3" }, diff --git a/sdks/v3-sdk/package.json b/sdks/v3-sdk/package.json index 22664411e..4b7d62f11 100644 --- a/sdks/v3-sdk/package.json +++ b/sdks/v3-sdk/package.json @@ -27,7 +27,7 @@ "dependencies": { "@ethersproject/abi": "^5.5.0", "@ethersproject/solidity": "^5.0.9", - "@helix-bridge/sdk-core": "1.0.5", + "@helix-bridge/sdk-core": "1.1.0", "@uniswap/swap-router-contracts": "^1.3.0", "@uniswap/v3-periphery": "^1.1.1", "@uniswap/v3-staker": "1.0.0", diff --git a/yarn.lock b/yarn.lock index 797032168..b0281178a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2272,6 +2272,20 @@ __metadata: languageName: node linkType: hard +"@helix-bridge/sdk-core@npm:1.1.0": + version: 1.1.0 + resolution: "@helix-bridge/sdk-core@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fsdk-core%2F1.1.0%2F623ec434c8255fb44ff4b31c1301fd239907509f" + dependencies: + "@ethersproject/address": ^5.0.2 + big.js: ^5.2.2 + decimal.js-light: ^2.5.0 + jsbi: ^3.1.4 + tiny-invariant: ^1.1.0 + toformat: ^2.0.0 + checksum: ec178d5b3ada15276f83658841790ff349f86f25072c9d7f68a1038e6757c52c784b9c0845943c4cf3d1d61bdb08535975eeefdc702831b8d727acc89e287270 + languageName: node + linkType: hard + "@helix-bridge/sdk-core@workspace:sdks/sdk-core": version: 0.0.0-use.local resolution: "@helix-bridge/sdk-core@workspace:sdks/sdk-core" @@ -2367,7 +2381,7 @@ __metadata: dependencies: "@ethersproject/address": ^5.0.2 "@ethersproject/solidity": ^5.0.9 - "@helix-bridge/sdk-core": 1.0.5 + "@helix-bridge/sdk-core": 1.1.0 "@types/big.js": ^4.0.5 "@types/jest": ^24.0.25 "@uniswap/v2-core": ^1.0.1 @@ -2400,7 +2414,7 @@ __metadata: dependencies: "@ethersproject/abi": ^5.5.0 "@ethersproject/solidity": ^5.0.9 - "@helix-bridge/sdk-core": 1.0.5 + "@helix-bridge/sdk-core": 1.1.0 "@types/jest": ^24.0.25 "@uniswap/swap-router-contracts": ^1.3.0 "@uniswap/v3-core": 1.0.0 From a4bc58a45813b56e61c2a7ba15eec0804375bc51 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:37:51 +0800 Subject: [PATCH 05/15] Bump version of v2-sdk and v3-sdk --- sdks/v2-sdk/package.json | 2 +- sdks/v3-sdk/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/v2-sdk/package.json b/sdks/v2-sdk/package.json index 9698bc8a0..3ff6cacda 100644 --- a/sdks/v2-sdk/package.json +++ b/sdks/v2-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@helix-bridge/v2-sdk", - "version": "1.0.5", + "version": "1.1.0", "description": "🛠 An SDK for building applications on top of Uniswap V2", "repository": "https://github.com/Uniswap/sdks.git", "keywords": [ diff --git a/sdks/v3-sdk/package.json b/sdks/v3-sdk/package.json index 4b7d62f11..70212fb18 100644 --- a/sdks/v3-sdk/package.json +++ b/sdks/v3-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@helix-bridge/v3-sdk", - "version": "1.0.5", + "version": "1.1.0", "description": "⚒️ An SDK for building applications on top of Uniswap V3", "repository": "https://github.com/Uniswap/sdks.git", "keywords": [ From e6a834ada0add28171863fbafee01965f1530a3f Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:39:10 +0800 Subject: [PATCH 06/15] Publish v2-sdk and v3-sdk --- .github/workflows/release-packages.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index 3a0c83bcc..40323a291 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -31,15 +31,16 @@ jobs: - name: Build packages # run: yarn g:build run: | - yarn sdk @helix-bridge/sdk-core build + yarn sdk @helix-bridge/v2-sdk build + yarn sdk @helix-bridge/v3-sdk build - name: Publish to GitHub Packages run: | - npm publish -w @helix-bridge/sdk-core + npm publish -w @helix-bridge/v2-sdk + npm publish -w @helix-bridge/v3-sdk + # npm publish -w @helix-bridge/sdk-core # npm publish -w @helix-bridge/universal-router-sdk # npm publish -w @helix-bridge/uniswapx-sdk # npm publish -w @helix-bridge/router-sdk - # npm publish -w @helix-bridge/v2-sdk - # npm publish -w @helix-bridge/v3-sdk env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 812cf774134eb7f68b4ef0b96b6829cb82d03e7f Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:43:45 +0800 Subject: [PATCH 07/15] Update dependencies for router-sdk --- sdks/router-sdk/package.json | 6 +++--- yarn.lock | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/sdks/router-sdk/package.json b/sdks/router-sdk/package.json index 89e489550..9b8805fcb 100644 --- a/sdks/router-sdk/package.json +++ b/sdks/router-sdk/package.json @@ -22,9 +22,9 @@ }, "dependencies": { "@ethersproject/abi": "^5.5.0", - "@helix-bridge/sdk-core": "1.0.5", - "@helix-bridge/v2-sdk": "1.0.5", - "@helix-bridge/v3-sdk": "1.0.5", + "@helix-bridge/sdk-core": "1.1.0", + "@helix-bridge/v2-sdk": "1.1.0", + "@helix-bridge/v3-sdk": "1.1.0", "@uniswap/swap-router-contracts": "^1.3.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index b0281178a..ff0d2c1fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2234,9 +2234,9 @@ __metadata: resolution: "@helix-bridge/router-sdk@workspace:sdks/router-sdk" dependencies: "@ethersproject/abi": ^5.5.0 - "@helix-bridge/sdk-core": 1.0.5 - "@helix-bridge/v2-sdk": 1.0.5 - "@helix-bridge/v3-sdk": 1.0.5 + "@helix-bridge/sdk-core": 1.1.0 + "@helix-bridge/v2-sdk": 1.1.0 + "@helix-bridge/v3-sdk": 1.1.0 "@types/jest": ^24.0.25 "@uniswap/swap-router-contracts": ^1.3.0 prettier: ^2.4.1 @@ -2375,6 +2375,19 @@ __metadata: languageName: node linkType: hard +"@helix-bridge/v2-sdk@npm:1.1.0": + version: 1.1.0 + resolution: "@helix-bridge/v2-sdk@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fv2-sdk%2F1.1.0%2Fff090c94a8f78ba2f1fa1e9f4821bfdc1952fa32" + dependencies: + "@ethersproject/address": ^5.0.2 + "@ethersproject/solidity": ^5.0.9 + "@helix-bridge/sdk-core": 1.1.0 + tiny-invariant: ^1.1.0 + tiny-warning: ^1.0.3 + checksum: 7f878dc3180ff47b6c68e3f118a8811e6a14d24b91c36c587f0db6d16a40bdac2b9f7fd43a21040ebb1bfa6fa731c9eef8564564c246b49f10f12105d305b03a + languageName: node + linkType: hard + "@helix-bridge/v2-sdk@workspace:sdks/v2-sdk": version: 0.0.0-use.local resolution: "@helix-bridge/v2-sdk@workspace:sdks/v2-sdk" @@ -2408,6 +2421,22 @@ __metadata: languageName: node linkType: hard +"@helix-bridge/v3-sdk@npm:1.1.0": + version: 1.1.0 + resolution: "@helix-bridge/v3-sdk@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fv3-sdk%2F1.1.0%2Fb201a7d1e7e8a8bddab3da1b612f4bdb6d887328" + dependencies: + "@ethersproject/abi": ^5.5.0 + "@ethersproject/solidity": ^5.0.9 + "@helix-bridge/sdk-core": 1.1.0 + "@uniswap/swap-router-contracts": ^1.3.0 + "@uniswap/v3-periphery": ^1.1.1 + "@uniswap/v3-staker": 1.0.0 + tiny-invariant: ^1.1.0 + tiny-warning: ^1.0.3 + checksum: e47ebce15864313a0fe62a76029e8238bdb60d6f82f7709d52bb038b0bf02b9c91a5a2f0b99ddfc8350e554214b723814a46008f3dbe2e1eab64812f9cb8831c + languageName: node + linkType: hard + "@helix-bridge/v3-sdk@workspace:sdks/v3-sdk": version: 0.0.0-use.local resolution: "@helix-bridge/v3-sdk@workspace:sdks/v3-sdk" From 38c5668ab56780871d5ab5ef7c1ef688a13c5701 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:44:31 +0800 Subject: [PATCH 08/15] Bump version of router-sdk --- sdks/router-sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/router-sdk/package.json b/sdks/router-sdk/package.json index 9b8805fcb..bdc257982 100644 --- a/sdks/router-sdk/package.json +++ b/sdks/router-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@helix-bridge/router-sdk", - "version": "1.0.5", + "version": "1.1.0", "description": "An sdk for routing swaps using Uniswap v2 and Uniswap v3.", "repository": "https://github.com/Uniswap/sdks.git", "keywords": [ From 76faafa934a6abb57192aec323b88137f7e1143d Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:45:23 +0800 Subject: [PATCH 09/15] Publish router-sdk --- .github/workflows/release-packages.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index 40323a291..ec2a1c404 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -31,16 +31,15 @@ jobs: - name: Build packages # run: yarn g:build run: | - yarn sdk @helix-bridge/v2-sdk build - yarn sdk @helix-bridge/v3-sdk build + yarn sdk @helix-bridge/router-sdk build - name: Publish to GitHub Packages run: | - npm publish -w @helix-bridge/v2-sdk - npm publish -w @helix-bridge/v3-sdk + npm publish -w @helix-bridge/router-sdk + # npm publish -w @helix-bridge/v2-sdk + # npm publish -w @helix-bridge/v3-sdk # npm publish -w @helix-bridge/sdk-core # npm publish -w @helix-bridge/universal-router-sdk # npm publish -w @helix-bridge/uniswapx-sdk - # npm publish -w @helix-bridge/router-sdk env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 9def311cfbc6d1fb5ba37cb05723366b13fb910a Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:55:37 +0800 Subject: [PATCH 10/15] Update dependencies for uniswapx-sdk --- sdks/uniswapx-sdk/integration/package.json | 2 +- sdks/uniswapx-sdk/package.json | 2 +- yarn.lock | 18 ++---------------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/sdks/uniswapx-sdk/integration/package.json b/sdks/uniswapx-sdk/integration/package.json index 2fb7b39e0..0ecb932ac 100644 --- a/sdks/uniswapx-sdk/integration/package.json +++ b/sdks/uniswapx-sdk/integration/package.json @@ -29,7 +29,7 @@ }, "dependencies": { "@ethersproject/bytes": "^5.7.0", - "@helix-bridge/sdk-core": "1.0.1", + "@helix-bridge/sdk-core": "1.1.0", "@typechain/ethers-v5": "^10.1.0", "@typechain/hardhat": "^6.1.2", "ethers": "^5.7.0", diff --git a/sdks/uniswapx-sdk/package.json b/sdks/uniswapx-sdk/package.json index 07450fefe..339e18082 100644 --- a/sdks/uniswapx-sdk/package.json +++ b/sdks/uniswapx-sdk/package.json @@ -31,7 +31,7 @@ "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/providers": "^5.7.0", - "@helix-bridge/sdk-core": "1.0.5", + "@helix-bridge/sdk-core": "1.1.0", "@uniswap/permit2-sdk": "^1.2.1", "ethers": "^5.7.0" }, diff --git a/yarn.lock b/yarn.lock index ff0d2c1fe..d0561a773 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2244,20 +2244,6 @@ __metadata: languageName: unknown linkType: soft -"@helix-bridge/sdk-core@npm:1.0.1": - version: 1.0.1 - resolution: "@helix-bridge/sdk-core@npm:1.0.1::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fsdk-core%2F1.0.1%2F9ce578576eec1dc6470b49507c07da35861990b5" - dependencies: - "@ethersproject/address": ^5.0.2 - big.js: ^5.2.2 - decimal.js-light: ^2.5.0 - jsbi: ^3.1.4 - tiny-invariant: ^1.1.0 - toformat: ^2.0.0 - checksum: 208b88cd4e46a1108e67954337ec11312c4187241790ed1df2a6d6ce3967931103bd0e240b9a22ad760a24b2c0bc952efa0ddbce38e2cb0c61fc4885ea344fcf - languageName: node - linkType: hard - "@helix-bridge/sdk-core@npm:1.0.5": version: 1.0.5 resolution: "@helix-bridge/sdk-core@npm:1.0.5::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fsdk-core%2F1.0.5%2F9ce81e268c84d0c8dd7126bf198d7b93da9c41eb" @@ -2308,7 +2294,7 @@ __metadata: dependencies: "@ethersproject/bytes": ^5.7.0 "@ethersproject/providers": ^5.7.0 - "@helix-bridge/sdk-core": 1.0.5 + "@helix-bridge/sdk-core": 1.1.0 "@typechain/ethers-v5": ^10.1.0 "@types/jest": ^24.0.25 "@types/node": ^18.7.16 @@ -17867,7 +17853,7 @@ __metadata: resolution: "uniswapx-integration@workspace:sdks/uniswapx-sdk/integration" dependencies: "@ethersproject/bytes": ^5.7.0 - "@helix-bridge/sdk-core": 1.0.1 + "@helix-bridge/sdk-core": 1.1.0 "@nomicfoundation/hardhat-chai-matchers": 1.0.6 "@nomicfoundation/hardhat-network-helpers": ^1.0.10 "@nomiclabs/hardhat-ethers": ^2.2.3 From cb570abed77bfffbc32344c45cd6a8c55085cbd8 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:57:12 +0800 Subject: [PATCH 11/15] Bump version of uniswapx-sdk --- sdks/uniswapx-sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/uniswapx-sdk/package.json b/sdks/uniswapx-sdk/package.json index 339e18082..fd659144d 100644 --- a/sdks/uniswapx-sdk/package.json +++ b/sdks/uniswapx-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@helix-bridge/uniswapx-sdk", - "version": "1.0.5", + "version": "1.1.0", "author": "Uniswap", "repository": "https://github.com/Uniswap/sdks.git", "keywords": [ From ad1ff3c6d89f3c70356f6d14dba45ef4320bfe8f Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 10:57:33 +0800 Subject: [PATCH 12/15] Publish uniswapx-sdk --- .github/workflows/release-packages.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index ec2a1c404..df756ddfe 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -30,16 +30,21 @@ jobs: - name: Build packages # run: yarn g:build - run: | - yarn sdk @helix-bridge/router-sdk build + # run: yarn sdk @helix-bridge/sdk-core build + # run: | + # yarn sdk @helix-bridge/v2-sdk build + # yarn sdk @helix-bridge/v3-sdk build + # run: yarn sdk @helix-bridge/router-sdk build + run: yarn sdk @helix-bridge/uniswapx-sdk build + # run: yarn sdk @helix-bridge/universal-router-sdk build - name: Publish to GitHub Packages - run: | - npm publish -w @helix-bridge/router-sdk - # npm publish -w @helix-bridge/v2-sdk - # npm publish -w @helix-bridge/v3-sdk - # npm publish -w @helix-bridge/sdk-core - # npm publish -w @helix-bridge/universal-router-sdk - # npm publish -w @helix-bridge/uniswapx-sdk + # run: npm publish -w @helix-bridge/sdk-core + # run: | + # npm publish -w @helix-bridge/v2-sdk + # npm publish -w @helix-bridge/v3-sdk + # run: npm publish -w @helix-bridge/router-sdk + run: npm publish -w @helix-bridge/uniswapx-sdk + # run: npm publish -w @helix-bridge/universal-router-sdk env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From d5030d2f0063523c298bb6001ff7807f6c662bb5 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 11:05:01 +0800 Subject: [PATCH 13/15] Supported of universal-router-sdk --- sdks/universal-router-sdk/package.json | 8 +-- .../src/utils/constants.ts | 8 ++- yarn.lock | 65 ++++--------------- 3 files changed, 22 insertions(+), 59 deletions(-) diff --git a/sdks/universal-router-sdk/package.json b/sdks/universal-router-sdk/package.json index a6815adc4..762e51ade 100644 --- a/sdks/universal-router-sdk/package.json +++ b/sdks/universal-router-sdk/package.json @@ -31,10 +31,10 @@ "test:hardhat": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' hardhat test" }, "dependencies": { - "@helix-bridge/router-sdk": "1.0.5", - "@helix-bridge/sdk-core": "1.0.5", - "@helix-bridge/v2-sdk": "1.0.5", - "@helix-bridge/v3-sdk": "1.0.5", + "@helix-bridge/router-sdk": "1.1.0", + "@helix-bridge/sdk-core": "1.1.0", + "@helix-bridge/v2-sdk": "1.1.0", + "@helix-bridge/v3-sdk": "1.1.0", "@uniswap/permit2-sdk": "^1.2.1", "@uniswap/universal-router": "1.6.0", "bignumber.js": "^9.0.2", diff --git a/sdks/universal-router-sdk/src/utils/constants.ts b/sdks/universal-router-sdk/src/utils/constants.ts index c6766c9df..ddf552d3e 100644 --- a/sdks/universal-router-sdk/src/utils/constants.ts +++ b/sdks/universal-router-sdk/src/utils/constants.ts @@ -120,7 +120,13 @@ const CHAIN_CONFIGS: { [key: number]: ChainConfig } = { router: '0x0ac58df0cc3542bec4cda71b16d06c3ccc39f405', weth: '0xfF204e2681A6fA0e2C3FaDe68a1B28fb90E4Fc5F', creationBlock: 2753030, - } + }, + // darwinia + [46]: { + router: '0xF8cD37bfC0f8a377b8A82C574c1bC4370EDc480B', + weth: '0xE7578598Aac020abFB918f33A20faD5B71d670b4', + creationBlock: 3087706, + }, } export const UNIVERSAL_ROUTER_ADDRESS = (chainId: number): string => { diff --git a/yarn.lock b/yarn.lock index d0561a773..c94406331 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2216,16 +2216,16 @@ __metadata: languageName: node linkType: hard -"@helix-bridge/router-sdk@npm:1.0.5": - version: 1.0.5 - resolution: "@helix-bridge/router-sdk@npm:1.0.5::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Frouter-sdk%2F1.0.5%2F61669a7a2b82ba3ee71314b979ad7c8ff0e1cf4f" +"@helix-bridge/router-sdk@npm:1.1.0": + version: 1.1.0 + resolution: "@helix-bridge/router-sdk@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Frouter-sdk%2F1.1.0%2F5aade6589e6ea9ae00af042e7320a0c79949d820" dependencies: "@ethersproject/abi": ^5.5.0 - "@helix-bridge/sdk-core": 1.0.5 - "@helix-bridge/v2-sdk": 1.0.5 - "@helix-bridge/v3-sdk": 1.0.5 + "@helix-bridge/sdk-core": 1.1.0 + "@helix-bridge/v2-sdk": 1.1.0 + "@helix-bridge/v3-sdk": 1.1.0 "@uniswap/swap-router-contracts": ^1.3.0 - checksum: 0ada524ee42f6ebd8e5963b4addfb6320a1b4b8cbe32e7f887e89ff0a5c4f8cc6a6dbbe7d23c273c0b4055018a5d1f2cd5e3611bf2baf13653c8234587b091b9 + checksum: e5c8ab16af8be60923c997baddaeef8f06094e528f2b8151435fed1ce289429dfd88e112188eff7bb50ca7c250795595e967152bf4bf42a2dc7e19395eb945ca languageName: node linkType: hard @@ -2244,20 +2244,6 @@ __metadata: languageName: unknown linkType: soft -"@helix-bridge/sdk-core@npm:1.0.5": - version: 1.0.5 - resolution: "@helix-bridge/sdk-core@npm:1.0.5::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fsdk-core%2F1.0.5%2F9ce81e268c84d0c8dd7126bf198d7b93da9c41eb" - dependencies: - "@ethersproject/address": ^5.0.2 - big.js: ^5.2.2 - decimal.js-light: ^2.5.0 - jsbi: ^3.1.4 - tiny-invariant: ^1.1.0 - toformat: ^2.0.0 - checksum: e63e456044542c0e8c5ea6b44dcd377c44c3be984c63625d9ef67dbf69bdd1c08691dda61d75b5ff0d3022120613c40afb02ba7dc11c97933139855fc34e84c7 - languageName: node - linkType: hard - "@helix-bridge/sdk-core@npm:1.1.0": version: 1.1.0 resolution: "@helix-bridge/sdk-core@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fsdk-core%2F1.1.0%2F623ec434c8255fb44ff4b31c1301fd239907509f" @@ -2323,10 +2309,10 @@ __metadata: version: 0.0.0-use.local resolution: "@helix-bridge/universal-router-sdk@workspace:sdks/universal-router-sdk" dependencies: - "@helix-bridge/router-sdk": 1.0.5 - "@helix-bridge/sdk-core": 1.0.5 - "@helix-bridge/v2-sdk": 1.0.5 - "@helix-bridge/v3-sdk": 1.0.5 + "@helix-bridge/router-sdk": 1.1.0 + "@helix-bridge/sdk-core": 1.1.0 + "@helix-bridge/v2-sdk": 1.1.0 + "@helix-bridge/v3-sdk": 1.1.0 "@types/chai": ^4.3.3 "@types/mocha": ^9.1.1 "@types/node": ^18.7.16 @@ -2348,19 +2334,6 @@ __metadata: languageName: unknown linkType: soft -"@helix-bridge/v2-sdk@npm:1.0.5": - version: 1.0.5 - resolution: "@helix-bridge/v2-sdk@npm:1.0.5::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fv2-sdk%2F1.0.5%2Fc346994af25ca6540c435b7bfa46eb999fdcdaae" - dependencies: - "@ethersproject/address": ^5.0.2 - "@ethersproject/solidity": ^5.0.9 - "@helix-bridge/sdk-core": 1.0.5 - tiny-invariant: ^1.1.0 - tiny-warning: ^1.0.3 - checksum: ada184f380c97e5a7282854682cdba49244fb6ba99734a165d8992293faad35e50a18c1887117fe6abc9d37a9b73f135d91e80a6b992ff50a7a47e81f8657813 - languageName: node - linkType: hard - "@helix-bridge/v2-sdk@npm:1.1.0": version: 1.1.0 resolution: "@helix-bridge/v2-sdk@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fv2-sdk%2F1.1.0%2Fff090c94a8f78ba2f1fa1e9f4821bfdc1952fa32" @@ -2391,22 +2364,6 @@ __metadata: languageName: unknown linkType: soft -"@helix-bridge/v3-sdk@npm:1.0.5": - version: 1.0.5 - resolution: "@helix-bridge/v3-sdk@npm:1.0.5::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fv3-sdk%2F1.0.5%2F9c1d40d7e3ff8a7e00e68084e6cc78375193e360" - dependencies: - "@ethersproject/abi": ^5.5.0 - "@ethersproject/solidity": ^5.0.9 - "@helix-bridge/sdk-core": 1.0.5 - "@uniswap/swap-router-contracts": ^1.3.0 - "@uniswap/v3-periphery": ^1.1.1 - "@uniswap/v3-staker": 1.0.0 - tiny-invariant: ^1.1.0 - tiny-warning: ^1.0.3 - checksum: 0b11c3ffd741a4bd45edfd09950f1b2e8b0b629c3b7a31f8553e0b1f238e37765287bd488917d77bdc1302bd79b1eb097576b7486fe19ea8bdba6510314d10f0 - languageName: node - linkType: hard - "@helix-bridge/v3-sdk@npm:1.1.0": version: 1.1.0 resolution: "@helix-bridge/v3-sdk@npm:1.1.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40helix-bridge%2Fv3-sdk%2F1.1.0%2Fb201a7d1e7e8a8bddab3da1b612f4bdb6d887328" From 639126ea537900b446e9071664e58e6b92eaac7f Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 11:05:27 +0800 Subject: [PATCH 14/15] Bump version of universal-router-sdk --- sdks/universal-router-sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/universal-router-sdk/package.json b/sdks/universal-router-sdk/package.json index 762e51ade..268fa2e20 100644 --- a/sdks/universal-router-sdk/package.json +++ b/sdks/universal-router-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@helix-bridge/universal-router-sdk", - "version": "1.0.5", + "version": "1.1.0", "description": "sdk for integrating with the Universal Router contracts", "repository": "https://github.com/Uniswap/sdks.git", "keywords": [ From 4943be9a0e89e2fc7f17fab36d9f0032102dd73c Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 11 Jul 2024 11:05:48 +0800 Subject: [PATCH 15/15] Publish universal-router-sdk --- .github/workflows/release-packages.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index df756ddfe..475a79485 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -35,8 +35,8 @@ jobs: # yarn sdk @helix-bridge/v2-sdk build # yarn sdk @helix-bridge/v3-sdk build # run: yarn sdk @helix-bridge/router-sdk build - run: yarn sdk @helix-bridge/uniswapx-sdk build - # run: yarn sdk @helix-bridge/universal-router-sdk build + # run: yarn sdk @helix-bridge/uniswapx-sdk build + run: yarn sdk @helix-bridge/universal-router-sdk build - name: Publish to GitHub Packages # run: npm publish -w @helix-bridge/sdk-core @@ -44,7 +44,7 @@ jobs: # npm publish -w @helix-bridge/v2-sdk # npm publish -w @helix-bridge/v3-sdk # run: npm publish -w @helix-bridge/router-sdk - run: npm publish -w @helix-bridge/uniswapx-sdk - # run: npm publish -w @helix-bridge/universal-router-sdk + # run: npm publish -w @helix-bridge/uniswapx-sdk + run: npm publish -w @helix-bridge/universal-router-sdk env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}