From 5af5de7d80982565d20484645e6dd227f28bccad Mon Sep 17 00:00:00 2001 From: vrtnd Date: Fri, 13 Oct 2023 17:20:43 +0300 Subject: [PATCH 01/28] fix NaN --- src/handlers/getBridges.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/getBridges.ts b/src/handlers/getBridges.ts index a51ca3b5..80e501ff 100644 --- a/src/handlers/getBridges.ts +++ b/src/handlers/getBridges.ts @@ -50,10 +50,10 @@ const getBridges = async () => { const lastDayHourlyVolume = await getHourlyBridgeVolume(hourlyStartTimestamp, currentTimestamp, undefined, id); if (lastDayHourlyVolume?.length) { const lastHourlyVolumeRecord = lastDayHourlyVolume[lastDayHourlyVolume.length - 1]; - lastHourlyVolume = (lastHourlyVolumeRecord.depositUSD + lastHourlyVolumeRecord.withdrawUSD) / 2; + lastHourlyVolume = (lastHourlyVolumeRecord.depositUSD + lastHourlyVolumeRecord.withdrawUSD) / 2 || 0; lastDayHourlyVolume.map((entry) => { - const volume = (entry.depositUSD + entry.withdrawUSD) / 2; + const volume = (entry.depositUSD + entry.withdrawUSD) / 2 || 0; currentDayVolume += volume; }); From 7511bd62fc735a827cf6db1e81e1b35961cdb076 Mon Sep 17 00:00:00 2001 From: vrtnd Date: Fri, 13 Oct 2023 17:32:00 +0300 Subject: [PATCH 02/28] rmv wanbridge --- package-lock.json | 2 +- package.json | 5 ++- src/data/bridgeNetworkData.ts | 68 +++++++++++++++++------------------ 3 files changed, 37 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea7fc271..dfdfa44d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "bridges-server", + "name": "bridges_server", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 2aa74421..468b698a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "ts-loader": "^9.3.1" }, "dependencies": { - "@defillama/sdk": "^4.0.64", + "@defillama/sdk": "^4.0.43", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", @@ -30,7 +30,6 @@ "graphql-request": "^4.0.0", "node-fetch": "^2.6.7", "postgres": "^3.2.4", - "serverless-webpack": "^5.8.0", - "typescript": "^5.2.2" + "serverless-webpack": "^5.8.0" } } diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 9ef1c837..1884b150 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -584,38 +584,38 @@ export default [ "polygon zkevm": "polygon_zkevm", }, }, - { - id: 40, - displayName: "WanBridge", - bridgeDbName: "wanbridge", - iconLink: "icons:wanbridge", - largeTxThreshold: 10000, - url: "https://bridge.wanchain.org", - chains: [ - "Ethereum", - "Polygon", - "Fantom", - "Avalanche", - "Arbitrum", - "Optimism", - "BSC", - "Moonbeam", - "Moonriver", - "FunctionX", - "Telos", - "Okexchain", - "Horizen", - "Metis", - "Astar", - "Vinuchain", - "Tron", - "Wanchain", - "Clover", - "Gather", - "XDC", - ], - chainMapping: { - avalanche: "avax", - }, - }, + // { + // id: 40, + // displayName: "WanBridge", + // bridgeDbName: "wanbridge", + // iconLink: "icons:wanbridge", + // largeTxThreshold: 10000, + // url: "https://bridge.wanchain.org", + // chains: [ + // "Ethereum", + // "Polygon", + // "Fantom", + // "Avalanche", + // "Arbitrum", + // "Optimism", + // "BSC", + // "Moonbeam", + // "Moonriver", + // "FunctionX", + // "Telos", + // "Okexchain", + // "Horizen", + // "Metis", + // "Astar", + // "Vinuchain", + // "Tron", + // "Wanchain", + // "Clover", + // "Gather", + // "XDC", + // ], + // chainMapping: { + // avalanche: "avax", + // }, + // }, ] as BridgeNetwork[]; From faf1c2699bd0a9e26a75a2046bb013725b75253b Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Mon, 16 Oct 2023 06:22:55 +0100 Subject: [PATCH 03/28] update chain name --- src/data/bridgeNetworkData.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 1884b150..0ab6dfc1 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -519,8 +519,8 @@ export default [ iconLink: "icons:manta-pacific-bridge", largeTxThreshold: 10000, url: "", - chains: ["Ethereum", "Manta Pacific"], - destinationChain: "Manta Pacific", + chains: ["Ethereum", "Manta"], + destinationChain: "Manta", }, // { From f8a5fe43b41da56d5027ee7d2f36920a4a283057 Mon Sep 17 00:00:00 2001 From: Nicolas BERNARD Date: Tue, 17 Oct 2023 11:47:56 +0200 Subject: [PATCH 04/28] rhinofi scroll bridge config --- src/adapters/rhinofi/index.ts | 2 ++ src/data/bridgeNetworkData.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/adapters/rhinofi/index.ts b/src/adapters/rhinofi/index.ts index 31fdbc41..c678f4ce 100644 --- a/src/adapters/rhinofi/index.ts +++ b/src/adapters/rhinofi/index.ts @@ -12,6 +12,7 @@ export const bridgesAddress = { polygon_zkevm: "0x65a4b8a0927c7fd899aed24356bf83810f7b9a3f", linea: "0xcf68a2721394dcf5dcf66f6265c1819720f24528", manta: "0x2b4553122d960ca98075028d68735cc6b15deeb5", + scroll: "0x87627c7e586441eef9ee3c28b66662e897513f33" } as const; type SupportedChains = keyof typeof bridgesAddress; @@ -79,6 +80,7 @@ const adapter: BridgeAdapter = { "zksync era": constructParams("era"), "polygon zkevm": constructParams("polygon_zkevm"), linea: constructParams("linea"), + scroll: constructParams("scroll") // 'manta pacific': constructParams('manta') }; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 0ab6dfc1..47be655e 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -577,7 +577,7 @@ export default [ iconLink: "icons:rhino.fi", largeTxThreshold: 10000, url: "", - chains: ["Arbitrum", "Arbitrum Nova", "BSC", "Polygon", "Optimism", "Base", "zkSync Era", "Polygon zkEVM", "Linea"], + chains: ["Arbitrum", "Arbitrum Nova", "BSC", "Polygon", "Optimism", "Base", "zkSync Era", "Polygon zkEVM", "Linea", "Scroll"], chainMapping: { "arbitrum nova": "arbitrum_nova", "zksync era": "era", From e4bb71c2d51e3fd92f6cbce388f7a4a0ea8c114a Mon Sep 17 00:00:00 2001 From: allush Date: Wed, 18 Oct 2023 10:54:03 +0100 Subject: [PATCH 05/28] symbiosis adds Tron and Scroll support --- src/adapters/symbiosis/contracts.ts | 8 ++++++++ src/adapters/symbiosis/index.ts | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/adapters/symbiosis/contracts.ts b/src/adapters/symbiosis/contracts.ts index 9f683b53..bb409f70 100644 --- a/src/adapters/symbiosis/contracts.ts +++ b/src/adapters/symbiosis/contracts.ts @@ -63,4 +63,12 @@ export const contracts = { portal: "0x292fC50e4eB66C3f6514b9E402dBc25961824D62", synthesis: null, }, + tron: { + portal: "0x4badeb0ca175da3ac6a4c886ca31990688d2a260", + synthesis: null, + }, + scroll: { + portal: "0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4", + synthesis: null, + }, } as const; \ No newline at end of file diff --git a/src/adapters/symbiosis/index.ts b/src/adapters/symbiosis/index.ts index c8c67d4f..001d1814 100644 --- a/src/adapters/symbiosis/index.ts +++ b/src/adapters/symbiosis/index.ts @@ -52,6 +52,8 @@ const adapter: BridgeAdapter = { linea: constructParams("linea"), base: constructParams("base"), mantle: constructParams("mantle"), + tron: constructParams("tron"), + scroll: constructParams("scroll"), }; export default adapter; From 40142405e97502d9bf5a7ef6896df96c3ac67660 Mon Sep 17 00:00:00 2001 From: 0xngmi <80541789+0xngmi@users.noreply.github.com> Date: Thu, 19 Oct 2023 02:10:29 +0100 Subject: [PATCH 06/28] merge #63 --- src/adapters/xdai/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/adapters/xdai/index.ts b/src/adapters/xdai/index.ts index 9123ed82..b9c268a0 100644 --- a/src/adapters/xdai/index.ts +++ b/src/adapters/xdai/index.ts @@ -6,7 +6,13 @@ import { constructTransferParams } from "../../helpers/eventParams"; // 0x88ad09518695c6c3712AC10a214bE5109a655671 is Gnosis Chain: Omni Bridge const daiDepositParams = constructTransferParams("0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016", true); -const daiWithdrawalParams = constructTransferParams("0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016", false); +const daiWithdrawalParams: PartialContractEventParams = constructTransferParams( + "0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016", + false, + { + excludeTo: ["0x83F20F44975D03b1b09e64809B757c47f942BEeA"], //sDAI + } +); const omniDepositEventParams: ContractEventParams = { target: "0x88ad09518695c6c3712AC10a214bE5109a655671", From 0bd92df34eb6470c64221197d1d11057bc1eebdb Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 19 Oct 2023 03:11:58 +0100 Subject: [PATCH 07/28] upgrade defillama/sdk --- package-lock.json | 2868 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 2708 insertions(+), 160 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfdfa44d..5fda53ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "bridges_server", + "name": "bridges-server", "lockfileVersion": 2, "requires": true, "packages": { @@ -58,6 +58,740 @@ "node": ">=6.0.0" } }, + "node_modules/@aws-crypto/crc32": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", + "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/crc32/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/crc32c": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/crc32c/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/ie11-detection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", + "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", + "dependencies": { + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/ie11-detection/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/sha1-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", + "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha1-browser/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", + "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/sha256-js": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", + "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha256-js/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", + "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", + "dependencies": { + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/util": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", + "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/util/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-sdk/client-s3": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.431.0.tgz", + "integrity": "sha512-Kh9GAKdhWfW//Q4HvH7yPO+2emN0h4PLoVk9rin1cCg78mkirnhJ5ffng6fRZDGDCvo7rDwrAqK/WrbcojMH9A==", + "dependencies": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.431.0", + "@aws-sdk/credential-provider-node": "3.431.0", + "@aws-sdk/middleware-bucket-endpoint": "3.430.0", + "@aws-sdk/middleware-expect-continue": "3.428.0", + "@aws-sdk/middleware-flexible-checksums": "3.428.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-location-constraint": "3.428.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-sdk-s3": "3.429.0", + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/middleware-ssec": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/signature-v4-multi-region": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@aws-sdk/xml-builder": "3.310.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/eventstream-serde-browser": "^2.0.11", + "@smithy/eventstream-serde-config-resolver": "^2.0.11", + "@smithy/eventstream-serde-node": "^2.0.11", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-blob-browser": "^2.0.11", + "@smithy/hash-node": "^2.0.11", + "@smithy/hash-stream-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/md5-js": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-stream": "^2.0.16", + "@smithy/util-utf8": "^2.0.0", + "@smithy/util-waiter": "^2.0.11", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.431.0.tgz", + "integrity": "sha512-iK8RxdBHFj1HtWpdTVfFdljZHXLWFv62SuIdkDswGE7L0zNbZIqBDGfEBnbagiQuxkz5D2YtnasydC5R3BcwVw==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.431.0.tgz", + "integrity": "sha512-IM/Fg3H1WuM9fnVriEoM6+sZ9LNUExxklxAnHwjLnprPRTDGbUXUfYjSry52LaQsZffP3RgWP11CYyjCYC8CfQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.431.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-sdk-sts": "3.428.0", + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.428.0.tgz", + "integrity": "sha512-e6fbY174Idzw0r5ZMT1qkDh+dpOp1DX3ickhr7J6ipo3cUGLI45Y5lnR9nYXWfB5o/wiNv4zXgN+Y3ORJJHzyA==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.431.0.tgz", + "integrity": "sha512-SILMZuscwxeqB4kuZjWiu24wfvmvN3Tx7/j5n0t0Ob+cdpweK0IqkBQ/QkTbTiG0M1l8trMtMkrTb5510fupcQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.428.0", + "@aws-sdk/credential-provider-process": "3.428.0", + "@aws-sdk/credential-provider-sso": "3.431.0", + "@aws-sdk/credential-provider-web-identity": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.431.0.tgz", + "integrity": "sha512-jj2gm92nfsFw5e48+7OCYM5PfiW3pd9FvhEoBfvKANwM6ztXzmNpQcz3iWsGVfzd+MUooVBoO2exhH9M8t+VDg==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.428.0", + "@aws-sdk/credential-provider-ini": "3.431.0", + "@aws-sdk/credential-provider-process": "3.428.0", + "@aws-sdk/credential-provider-sso": "3.431.0", + "@aws-sdk/credential-provider-web-identity": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.428.0.tgz", + "integrity": "sha512-UG2S2/4Wrskbkbgt9fBlnzwQ2hfTXvLJwUgGOluSOf6+mGCcoDku4zzc9EQdk1MwN5Us+ziyMrIMNY5sbdLg6g==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.431.0.tgz", + "integrity": "sha512-fh/yWKJtgEpxfuzd/KTVPQz0FjykbiPnU0OLm1wKgNZAyKTE9EyNvWR6P57TWv/sU8faa5uLaxdD0TBPxWReDA==", + "dependencies": { + "@aws-sdk/client-sso": "3.431.0", + "@aws-sdk/token-providers": "3.431.0", + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.428.0.tgz", + "integrity": "sha512-ueuUPPlrJFvtDUVTGnClUGt1wxCbEiKArknah/w9cfcc/c1HtFd/M7x/z2Sm0gSItR45sVcK54qjzmhm29DMzg==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.430.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.430.0.tgz", + "integrity": "sha512-oK0WTNpMQFewSIYcL3LPm+S46uUWFILlPYK0fEeYdMXn03380JqS9oIKOFFX7w6DhYY1ePHZI721ee1HiCtDvw==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.428.0.tgz", + "integrity": "sha512-d/vWUs9RD4fuO1oi7gJby6aEPb6XTf2+jCbrs/hUEYFMxQu7wwQx2c6BWAjfQca8zVadh7FY0cDNtL2Ep2d8zA==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.428.0.tgz", + "integrity": "sha512-O54XmBSvi9A6ZBRVSYrEvoGH1BjtR1TT8042gOdJgouI0OVWtjqHT2ZPVTbQ/rKW5QeLXszVloXFW6eqOwrVTg==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.428.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.431.0.tgz", + "integrity": "sha512-j+OBsCDDRXlMEQ4GCtTxVaMwxIHNKiwbDIZVyB6CDor8AFflKxWbO3cPSpUuGKlUN9OEexMR+XgwsjmaI6AGwg==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.428.0.tgz", + "integrity": "sha512-2YvAhkdzMITTc2fVIH7FS5Hqa7AuoHBg92W0CzPOiKBkC0D6m5hw8o5Z5RnH/M9ki2eB4dn+7uB6p7Lgs+VFdw==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.428.0.tgz", + "integrity": "sha512-1P0V0quL9u2amdNOn6yYT7/ToQUmkLJqCKHPxsRyDB829vBThWndvvH5MkoItj/VgE1zWqMtrzN3xtzD7zx6Qg==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.428.0.tgz", + "integrity": "sha512-xC0OMduCByyRdiQz324RXy4kunnCG4LUJCfvdoegM33Elp9ex0D3fcfO1mUgV8qiLwSennIsSRVXHuhNxE2HZA==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.429.0.tgz", + "integrity": "sha512-wCT5GoExncHUzUbW8b9q/PN3uPsbxit4PUAHw/hkrIHDKOxd9H/ClM37ZeJHNEOml5hnJOPy+rOaF9jRqo8dGg==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.428.0.tgz", + "integrity": "sha512-Uutl2niYXTnNP8v84v6umWDHD5no7d5/OqkZE1DsmeKR/dje90J5unJWf7MOsqvYm0JGDEWF4lk9xGVyqsw+Aw==", + "dependencies": { + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-signing": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.428.0.tgz", + "integrity": "sha512-oMSerTPwtsQAR7fIU/G0b0BA30wF+MC4gZSrJjbypF8MK8nPC2yMfKLR8+QavGOGEW7rUMQ0uklThMTTwQEXNQ==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.3.5", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.428.0.tgz", + "integrity": "sha512-QPKisAErRHFoopmdFhgOmjZPcUM6rvWCtnoEY4Sw9F0aIyK6yCTn+nB5j+3FAPvUvblE22srM6aow8TcGx1gjA==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.428.0.tgz", + "integrity": "sha512-+GAhObeHRick2D5jr3YkPckjcggt5v6uUVtEUQW2AdD65cE5PjIvmksv6FuM/mME/9nNA+wufQnHbLI8teLeaw==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.430.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.430.0.tgz", + "integrity": "sha512-9lqgtkcd4dqsQ2yN6V/i06blyDh4yLmS+fAS7LwEZih/NZZ2cBIR+5kb9c236auvTcuMcL1zFxVRloWwesYZjA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/types": "^2.3.5", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.428.0.tgz", + "integrity": "sha512-ImuontXK1vEHtxK+qiPVfLTk/+bKSwYqrVkE2/o5rnsqD78/wySzTn5RnkA73Nb+UL4qSd0dkOcuubEee2aUpQ==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.431.0.tgz", + "integrity": "sha512-0ksZogF3Gy2i+yBb7T2g2e7QXzwZeQHmf09ihR1cwXwg7UIjsap6P3gPtC085bDkOD9iY8OdpL0Esp06N6xmCg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.428.0.tgz", + "integrity": "sha512-4T0Ps2spjg3qbWE6ZK13Vd3FnzpfliaiotqjxUK5YhjDrKXeT36HJp46JhDupElQuHtTkpdiJOSYk2lvY2H4IA==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-arn-parser": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz", + "integrity": "sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.428.0.tgz", + "integrity": "sha512-ToKMhYlUWJ0YrbggpJLZeyZZNDXtQ4NITxqo/oeGltTT9KG4o/LqVY59EveV0f8P32ObDyj9Vh1mnjxeo3DxGw==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.310.0.tgz", + "integrity": "sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.428.0.tgz", + "integrity": "sha512-qlc2UoGsmCpuh1ErY3VayZuAGl74TWWcLmhhQMkeByFSb6KooBlwOmDpDzJRtgwJoe0KXnyHBO6lzl9iczcozg==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.430.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.430.0.tgz", + "integrity": "sha512-DPpFPL3mFMPtipFxjY7TKQBjnhmsPzYCr4Y+qna0oR6ij8jZOz2ILQDK33GxTRNh3+bV9YYbx+ZGDOnxoK5Mhw==", + "dependencies": { + "@aws-sdk/types": "3.428.0", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/util-utf8-browser": { + "version": "3.259.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.310.0.tgz", + "integrity": "sha512-TqELu4mOuSIKQCqj63fGVs86Yh+vBx5nHRpWKNUNhB2nPTpfbziTs5c1X358be3peVWA4wPxW7Nt53KIg1tnNw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -468,16 +1202,32 @@ } }, "node_modules/@defillama/sdk": { - "version": "4.0.43", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-4.0.43.tgz", - "integrity": "sha512-SS311nPgkIOEbqWe3n2kT8n3UKyLQhQmJcEhlMhv6XnPhIBk4l7kLQXQmOYHpetAZmvUxOVnQwZbl75vh2EM5w==", + "version": "4.0.64", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-4.0.64.tgz", + "integrity": "sha512-wqM4enhx11vN5OuRNpK9QMoOEQbbQFKu7tT0rM6ddYA4w1tvuayWAn8mjfV8TN5wd88aHV4+zNY0Sps+mrVN9w==", "dependencies": { + "@aws-sdk/client-s3": "^3.400.0", "@supercharge/promise-pool": "^2.1.0", "ethers": "^5.4.5", "node-fetch": "^2.6.7", + "p-limit": "^3.0.0", "tron-format-address": "^0.1.11" } }, + "node_modules/@defillama/sdk/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", @@ -2049,105 +2799,708 @@ "ws": "^7.5.3" }, "engines": { - "node": ">=10.0" + "node": ">=10.0" + } + }, + "node_modules/@serverless/platform-client/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@serverless/platform-client/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@serverless/platform-client/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@serverless/utils": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@serverless/utils/-/utils-6.7.0.tgz", + "integrity": "sha512-aUjkkOTJ5wH7f3raSIDeTCR4JsAbd9p5Pjs7yW3sVOmu0qiTPHZOr1x1TIkb3WDHiAoQQY8zGhfzW7zLTcAA3Q==", + "dependencies": { + "archive-type": "^4.0.0", + "chalk": "^4.1.2", + "ci-info": "^3.3.2", + "cli-progress-footer": "^2.3.2", + "content-disposition": "^0.5.4", + "d": "^1.0.1", + "decompress": "^4.2.1", + "event-emitter": "^0.3.5", + "ext": "^1.6.0", + "ext-name": "^5.0.0", + "file-type": "^16.5.3", + "filenamify": "^4.3.0", + "get-stream": "^6.0.1", + "got": "^11.8.5", + "inquirer": "^8.2.4", + "js-yaml": "^4.1.0", + "jwt-decode": "^3.1.2", + "lodash": "^4.17.21", + "log": "^6.3.1", + "log-node": "^8.0.3", + "make-dir": "^3.1.0", + "memoizee": "^0.4.15", + "ncjsm": "^4.3.0", + "node-fetch": "^2.6.7", + "open": "^7.4.2", + "p-event": "^4.2.0", + "supports-color": "^8.1.1", + "timers-ext": "^0.1.7", + "type": "^2.6.0", + "uni-global": "^1.0.0", + "uuid": "^8.3.2", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/@serverless/utils/node_modules/jwt-decode": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", + "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@smithy/abort-controller": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.11.tgz", + "integrity": "sha512-MSzE1qR2JNyb7ot3blIOT3O3H0Jn06iNDEgHRaqZUwBgx5EG+VIx24Y21tlKofzYryIOcWpIohLrIIyocD6LMA==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.0.tgz", + "integrity": "sha512-HM8V2Rp1y8+1343tkZUKZllFhEQPNmpNdgFAncbTsxkZ18/gqjk23XXv3qGyXWp412f3o43ZZ1UZHVcHrpRnCQ==", + "dependencies": { + "@smithy/util-base64": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/config-resolver": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.15.tgz", + "integrity": "sha512-a2Pfocla5nSrG2RyB8i20jcWgMyR71TUeFKm8pmrnZotr/X22tlg4y/EhSvBK2oTE8MKHlKh4YdpDO2AryJbGQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/types": "^2.3.5", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.17.tgz", + "integrity": "sha512-2XcD414yrwbxxuYueTo7tzLC2/w3jj9FZqfenpv3MQkocdOEmuOVS0v9WHsY/nW6V+2EcR340rj/z5HnvsHncQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/property-provider": "^2.0.12", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-codec": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.11.tgz", + "integrity": "sha512-BQCTjxhCYRZIfXapa2LmZSaH8QUBGwMZw7XRN83hrdixbLjIcj+o549zjkedFS07Ve2TlvWUI6BTzP+nv7snBA==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.3.5", + "@smithy/util-hex-encoding": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.11.tgz", + "integrity": "sha512-p9IK4uvwT6B3pT1VGlODvcVBfPVikjBFHAcKpvvNF+7lAEI+YiC6d0SROPkpjnvCgVBYyGXa3ciqrWnFze6mwQ==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.11.tgz", + "integrity": "sha512-vN32E8yExo0Z8L7kXhlU9KRURrhqOpPdLxQMp3MwfMThrjiqbr1Sk5srUXc1ed2Ygl/l0TEN9vwNG0bQHg6AjQ==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.11.tgz", + "integrity": "sha512-Gjqbpg7UmD+YzkpgNShNcDNZcUpBWIkvX2XCGptz5PoxJU/UQbuF9eSc93ZlIb7j4aGjtFfqk23HUMW8Hopg2Q==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.11.tgz", + "integrity": "sha512-F8FsxLTbFN4+Esgpo+nNKcEajrgRZJ+pG9c8+MhLM4Odp5ejLHw2GMCXd81cGsgmfcbnzdDEXazPPVzOwj89MQ==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.3.tgz", + "integrity": "sha512-0G9sePU+0R+8d7cie+OXzNbbkjnD4RfBlVCs46ZEuQAMcxK8OniemYXSSkOc80CCk8Il4DnlYZcUSvsIs2OB2w==", + "dependencies": { + "@smithy/protocol-http": "^3.0.7", + "@smithy/querystring-builder": "^2.0.11", + "@smithy/types": "^2.3.5", + "@smithy/util-base64": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.11.tgz", + "integrity": "sha512-/6vq/NiH2EN3mWdwcLdjVohP+VCng+ZA1GnlUdx959egsfgIlLWQvCyjnB2ze9Hr6VHV5XEFLLpLQH2dHA6Sgw==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/hash-node": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.11.tgz", + "integrity": "sha512-PbleVugN2tbhl1ZoNWVrZ1oTFFas/Hq+s6zGO8B9bv4w/StTriTKA9W+xZJACOj9X7zwfoTLbscM+avCB1KqOQ==", + "dependencies": { + "@smithy/types": "^2.3.5", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-stream-node": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.11.tgz", + "integrity": "sha512-Jn2yl+Dn0kvwKvSavvR1/BFVYa2wIkaJKWeTH48kno89gqHAJxMh1hrtBN6SJ7F8VhodNZTiNOlQVqCSfLheNQ==", + "dependencies": { + "@smithy/types": "^2.3.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.11.tgz", + "integrity": "sha512-zazq99ujxYv/NOf9zh7xXbNgzoVLsqE0wle8P/1zU/XdhPi/0zohTPKWUzIxjGdqb5hkkwfBkNkl5H+LE0mvgw==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/md5-js": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.11.tgz", + "integrity": "sha512-YBIv+e95qeGvQA05ucwstmTeQ/bUzWgU+nO2Ffmif5awu6IzSR0Jfk3XLYh4mdy7f8DCgsn8qA63u7N9Lu0+5A==", + "dependencies": { + "@smithy/types": "^2.3.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.13.tgz", + "integrity": "sha512-Md2kxWpaec3bXp1oERFPQPBhOXCkGSAF7uc1E+4rkwjgw3/tqAXRtbjbggu67HJdwaif76As8AV6XxbD1HzqTQ==", + "dependencies": { + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.2.tgz", + "integrity": "sha512-dua4r2EbSTRzNefz72snz+KDuXN73RCe1K+rGeemzUyYemxuh1jujFbLQbTU6DVlTgHkhtrbH0+kdOFY/SV4Qg==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.11", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/shared-ini-file-loader": "^2.2.1", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.17.tgz", + "integrity": "sha512-ZYVU1MmshCTbEKTNc5h7/Pps1vhH5C7hRclQWnAbVYKkIT+PEGu9dSVqprzEo/nlMA8Zv4Dj5Y+fv3pRnUwElw==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/protocol-http": "^3.0.7", + "@smithy/service-error-classification": "^2.0.4", + "@smithy/types": "^2.3.5", + "@smithy/util-middleware": "^2.0.4", + "@smithy/util-retry": "^2.0.4", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.11.tgz", + "integrity": "sha512-NuxnjMyf4zQqhwwdh0OTj5RqpnuT6HcH5Xg5GrPijPcKzc2REXVEVK4Yyk8ckj8ez1XSj/bCmJ+oNjmqB02GWA==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.5.tgz", + "integrity": "sha512-bVQU/rZzBY7CbSxIrDTGZYnBWKtIw+PL/cRc9B7etZk1IKSOe0NvKMJyWllfhfhrTeMF6eleCzOihIQympAvPw==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.2.tgz", + "integrity": "sha512-tbYh/JK/ddxKWYTtjLgap0juyivJ0wCvywMqINb54zyOVHoKYM6iYl7DosQA0owFaNp6GAx1lXFjqGz7L2fAqA==", + "dependencies": { + "@smithy/property-provider": "^2.0.12", + "@smithy/shared-ini-file-loader": "^2.2.1", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.7.tgz", + "integrity": "sha512-PQIKZXlp3awCDn/xNlCSTFE7aYG/5Tx33M05NfQmWYeB5yV1GZZOSz4dXpwiNJYTXb9jPqjl+ueXXkwtEluFFA==", + "dependencies": { + "@smithy/abort-controller": "^2.0.11", + "@smithy/protocol-http": "^3.0.7", + "@smithy/querystring-builder": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/property-provider": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.12.tgz", + "integrity": "sha512-Un/OvvuQ1Kg8WYtoMCicfsFFuHb/TKL3pCA6ZIo/WvNTJTR94RtoRnL7mY4XkkUAoFMyf6KjcQJ76y1FX7S5rw==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.7.tgz", + "integrity": "sha512-HnZW8y+r66ntYueCDbLqKwWcMNWW8o3eVpSrHNluwtBJ/EUWfQHRKSiu6vZZtc6PGfPQWgVfucoCE/C3QufMAA==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.11.tgz", + "integrity": "sha512-b4kEbVMxpmfv2VWUITn2otckTi7GlMteZQxi+jlwedoATOGEyrCJPfRcYQJjbCi3fZ2QTfh3PcORvB27+j38Yg==", + "dependencies": { + "@smithy/types": "^2.3.5", + "@smithy/util-uri-escape": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.11.tgz", + "integrity": "sha512-YXe7jhi7s3dQ0Fu9dLoY/gLu6NCyy8tBWJL/v2c9i7/RLpHgKT+uT96/OqZkHizCJ4kr0ZD46tzMjql/o60KLg==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.4.tgz", + "integrity": "sha512-77506l12I5gxTZqBkx3Wb0RqMG81bMYLaVQ+EqIWFwQDJRs5UFeXogKxSKojCmz1wLUziHZQXm03MBzPQiumQw==", + "dependencies": { + "@smithy/types": "^2.3.5" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.1.tgz", + "integrity": "sha512-eAYajwo2eTTVU5KPX90+V6ccfrWphrzcUwOt7n9pLOMBO0fOKlRVshbvCBqfRCxEn7OYDGH6TsL3yrx+hAjddA==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.11.tgz", + "integrity": "sha512-EFVU1dT+2s8xi227l1A9O27edT/GNKvyAK6lZnIZ0zhIHq/jSLznvkk15aonGAM1kmhmZBVGpI7Tt0odueZK9A==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.11", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.3.5", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-middleware": "^2.0.4", + "@smithy/util-uri-escape": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.11.tgz", + "integrity": "sha512-okjMbuBBCTiieK665OFN/ap6u9+Z9z55PMphS5FYCsS6Zfp137Q3qlnt0OgBAnUVnH/mNGyoJV0LBX9gkTWptg==", + "dependencies": { + "@smithy/middleware-stack": "^2.0.5", + "@smithy/types": "^2.3.5", + "@smithy/util-stream": "^2.0.16", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.5.tgz", + "integrity": "sha512-ehyDt8M9hehyxrLQGoA1BGPou8Js1Ocoh5M0ngDhJMqbFmNK5N6Xhr9/ZExWkyIW8XcGkiMPq3ZUEE0ScrhbuQ==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.11.tgz", + "integrity": "sha512-h89yXMCCF+S5k9XIoKltMIWTYj+FcEkU/IIFZ6RtE222fskOTL4Iak6ZRG+ehSvZDt8yKEcxqheTDq7JvvtK3g==", + "dependencies": { + "@smithy/querystring-parser": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/util-base64": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.0.tgz", + "integrity": "sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==", + "dependencies": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz", + "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", + "dependencies": { + "@smithy/is-array-buffer": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", + "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.15.tgz", + "integrity": "sha512-2raMZOYKSuke7QlDg/HDcxQdrp0zteJ8z+S0B9Rn23J55ZFNK1+IjG4HkN6vo/0u3Xy/JOdJ93ibiBSB8F7kOw==", + "dependencies": { + "@smithy/property-provider": "^2.0.12", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 10.0.0" } }, - "node_modules/@serverless/platform-client/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@smithy/util-defaults-mode-node": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.20.tgz", + "integrity": "sha512-kJjcZ/Lzvs3sPDKBwlhZsFFcgPNIpB3CMb6/saCakawRzo0E+JkyS3ZZRjVR3ce29yHtwoP/0YLKC1PeH0Dffg==", "dependencies": { - "sprintf-js": "~1.0.2" + "@smithy/config-resolver": "^2.0.15", + "@smithy/credential-provider-imds": "^2.0.17", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/property-provider": "^2.0.12", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 10.0.0" } }, - "node_modules/@serverless/platform-client/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/@smithy/util-hex-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", + "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "tslib": "^2.5.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@serverless/platform-client/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" + "node_modules/@smithy/util-middleware": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.4.tgz", + "integrity": "sha512-Pbu6P4MBwRcjrLgdTR1O4Y3c0sTZn2JdOiJNcgL7EcIStcQodj+6ZTXtbyU/WTEU3MV2NMA10LxFc3AWHZ3+4A==", + "dependencies": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.4.tgz", + "integrity": "sha512-b+n1jBBKc77C1E/zfBe1Zo7S9OXGBiGn55N0apfhZHxPUP/fMH5AhFUUcWaJh7NAnah284M5lGkBKuhnr3yK5w==", + "dependencies": { + "@smithy/service-error-classification": "^2.0.4", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@serverless/utils": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@serverless/utils/-/utils-6.7.0.tgz", - "integrity": "sha512-aUjkkOTJ5wH7f3raSIDeTCR4JsAbd9p5Pjs7yW3sVOmu0qiTPHZOr1x1TIkb3WDHiAoQQY8zGhfzW7zLTcAA3Q==", + "node_modules/@smithy/util-stream": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.16.tgz", + "integrity": "sha512-b5ZSRh1KzUzC7LoJcpfk7+iXGoRr3WylEfmPd4FnBLm90OwxSB9VgK1fDZwicfYxSEvWHdYXgvvjPtenEYBBhw==", "dependencies": { - "archive-type": "^4.0.0", - "chalk": "^4.1.2", - "ci-info": "^3.3.2", - "cli-progress-footer": "^2.3.2", - "content-disposition": "^0.5.4", - "d": "^1.0.1", - "decompress": "^4.2.1", - "event-emitter": "^0.3.5", - "ext": "^1.6.0", - "ext-name": "^5.0.0", - "file-type": "^16.5.3", - "filenamify": "^4.3.0", - "get-stream": "^6.0.1", - "got": "^11.8.5", - "inquirer": "^8.2.4", - "js-yaml": "^4.1.0", - "jwt-decode": "^3.1.2", - "lodash": "^4.17.21", - "log": "^6.3.1", - "log-node": "^8.0.3", - "make-dir": "^3.1.0", - "memoizee": "^0.4.15", - "ncjsm": "^4.3.0", - "node-fetch": "^2.6.7", - "open": "^7.4.2", - "p-event": "^4.2.0", - "supports-color": "^8.1.1", - "timers-ext": "^0.1.7", - "type": "^2.6.0", - "uni-global": "^1.0.0", - "uuid": "^8.3.2", - "write-file-atomic": "^4.0.1" + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/types": "^2.3.5", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" }, "engines": { - "node": ">=12.0" + "node": ">=14.0.0" } }, - "node_modules/@serverless/utils/node_modules/jwt-decode": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", - "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + "node_modules/@smithy/util-uri-escape": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", + "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "node_modules/@smithy/util-utf8": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.0.tgz", + "integrity": "sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==", + "dependencies": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, "engines": { - "node": ">=10" + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-waiter": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.11.tgz", + "integrity": "sha512-8SJWUl9O1YhjC77EccgltI3q4XZQp3vp9DGEW6o0OdkUcwqm/H4qOLnMkA2n+NDojuM5Iia2jWoCdbluIiG7TA==", + "dependencies": { + "@smithy/abort-controller": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" + "engines": { + "node": ">=14.0.0" } }, "node_modules/@supercharge/promise-pool": { @@ -2978,6 +4331,11 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "node_modules/boxen": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", @@ -5066,6 +6424,27 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, + "node_modules/fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "funding": [ + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + }, + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -8500,6 +9879,11 @@ "node": ">=0.10.0" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "node_modules/strtok3": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", @@ -8849,9 +10233,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type": { "version": "2.7.2", @@ -9408,82 +10792,732 @@ "yaml2json": "bin/yaml2json" } }, - "node_modules/yamljs/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" + "node_modules/yamljs/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "dependencies": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, + "@aws-crypto/crc32": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", + "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "requires": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/crc32c": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "requires": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/ie11-detection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", + "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", + "requires": { + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/sha1-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", + "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "requires": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/sha256-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", + "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", + "requires": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/sha256-js": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/sha256-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", + "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", + "requires": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/supports-web-crypto": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", + "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", + "requires": { + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-crypto/util": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", + "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", + "requires": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "@aws-sdk/client-s3": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.431.0.tgz", + "integrity": "sha512-Kh9GAKdhWfW//Q4HvH7yPO+2emN0h4PLoVk9rin1cCg78mkirnhJ5ffng6fRZDGDCvo7rDwrAqK/WrbcojMH9A==", + "requires": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.431.0", + "@aws-sdk/credential-provider-node": "3.431.0", + "@aws-sdk/middleware-bucket-endpoint": "3.430.0", + "@aws-sdk/middleware-expect-continue": "3.428.0", + "@aws-sdk/middleware-flexible-checksums": "3.428.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-location-constraint": "3.428.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-sdk-s3": "3.429.0", + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/middleware-ssec": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/signature-v4-multi-region": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@aws-sdk/xml-builder": "3.310.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/eventstream-serde-browser": "^2.0.11", + "@smithy/eventstream-serde-config-resolver": "^2.0.11", + "@smithy/eventstream-serde-node": "^2.0.11", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-blob-browser": "^2.0.11", + "@smithy/hash-node": "^2.0.11", + "@smithy/hash-stream-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/md5-js": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-stream": "^2.0.16", + "@smithy/util-utf8": "^2.0.0", + "@smithy/util-waiter": "^2.0.11", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/client-sso": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.431.0.tgz", + "integrity": "sha512-iK8RxdBHFj1HtWpdTVfFdljZHXLWFv62SuIdkDswGE7L0zNbZIqBDGfEBnbagiQuxkz5D2YtnasydC5R3BcwVw==", + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/client-sts": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.431.0.tgz", + "integrity": "sha512-IM/Fg3H1WuM9fnVriEoM6+sZ9LNUExxklxAnHwjLnprPRTDGbUXUfYjSry52LaQsZffP3RgWP11CYyjCYC8CfQ==", + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.431.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-sdk-sts": "3.428.0", + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-env": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.428.0.tgz", + "integrity": "sha512-e6fbY174Idzw0r5ZMT1qkDh+dpOp1DX3ickhr7J6ipo3cUGLI45Y5lnR9nYXWfB5o/wiNv4zXgN+Y3ORJJHzyA==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-ini": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.431.0.tgz", + "integrity": "sha512-SILMZuscwxeqB4kuZjWiu24wfvmvN3Tx7/j5n0t0Ob+cdpweK0IqkBQ/QkTbTiG0M1l8trMtMkrTb5510fupcQ==", + "requires": { + "@aws-sdk/credential-provider-env": "3.428.0", + "@aws-sdk/credential-provider-process": "3.428.0", + "@aws-sdk/credential-provider-sso": "3.431.0", + "@aws-sdk/credential-provider-web-identity": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-node": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.431.0.tgz", + "integrity": "sha512-jj2gm92nfsFw5e48+7OCYM5PfiW3pd9FvhEoBfvKANwM6ztXzmNpQcz3iWsGVfzd+MUooVBoO2exhH9M8t+VDg==", + "requires": { + "@aws-sdk/credential-provider-env": "3.428.0", + "@aws-sdk/credential-provider-ini": "3.431.0", + "@aws-sdk/credential-provider-process": "3.428.0", + "@aws-sdk/credential-provider-sso": "3.431.0", + "@aws-sdk/credential-provider-web-identity": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-process": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.428.0.tgz", + "integrity": "sha512-UG2S2/4Wrskbkbgt9fBlnzwQ2hfTXvLJwUgGOluSOf6+mGCcoDku4zzc9EQdk1MwN5Us+ziyMrIMNY5sbdLg6g==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-sso": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.431.0.tgz", + "integrity": "sha512-fh/yWKJtgEpxfuzd/KTVPQz0FjykbiPnU0OLm1wKgNZAyKTE9EyNvWR6P57TWv/sU8faa5uLaxdD0TBPxWReDA==", + "requires": { + "@aws-sdk/client-sso": "3.431.0", + "@aws-sdk/token-providers": "3.431.0", + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-web-identity": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.428.0.tgz", + "integrity": "sha512-ueuUPPlrJFvtDUVTGnClUGt1wxCbEiKArknah/w9cfcc/c1HtFd/M7x/z2Sm0gSItR45sVcK54qjzmhm29DMzg==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-bucket-endpoint": { + "version": "3.430.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.430.0.tgz", + "integrity": "sha512-oK0WTNpMQFewSIYcL3LPm+S46uUWFILlPYK0fEeYdMXn03380JqS9oIKOFFX7w6DhYY1ePHZI721ee1HiCtDvw==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-expect-continue": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.428.0.tgz", + "integrity": "sha512-d/vWUs9RD4fuO1oi7gJby6aEPb6XTf2+jCbrs/hUEYFMxQu7wwQx2c6BWAjfQca8zVadh7FY0cDNtL2Ep2d8zA==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-flexible-checksums": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.428.0.tgz", + "integrity": "sha512-O54XmBSvi9A6ZBRVSYrEvoGH1BjtR1TT8042gOdJgouI0OVWtjqHT2ZPVTbQ/rKW5QeLXszVloXFW6eqOwrVTg==", + "requires": { + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.428.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-host-header": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.431.0.tgz", + "integrity": "sha512-j+OBsCDDRXlMEQ4GCtTxVaMwxIHNKiwbDIZVyB6CDor8AFflKxWbO3cPSpUuGKlUN9OEexMR+XgwsjmaI6AGwg==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-location-constraint": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.428.0.tgz", + "integrity": "sha512-2YvAhkdzMITTc2fVIH7FS5Hqa7AuoHBg92W0CzPOiKBkC0D6m5hw8o5Z5RnH/M9ki2eB4dn+7uB6p7Lgs+VFdw==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-logger": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.428.0.tgz", + "integrity": "sha512-1P0V0quL9u2amdNOn6yYT7/ToQUmkLJqCKHPxsRyDB829vBThWndvvH5MkoItj/VgE1zWqMtrzN3xtzD7zx6Qg==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-recursion-detection": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.428.0.tgz", + "integrity": "sha512-xC0OMduCByyRdiQz324RXy4kunnCG4LUJCfvdoegM33Elp9ex0D3fcfO1mUgV8qiLwSennIsSRVXHuhNxE2HZA==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-sdk-s3": { + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.429.0.tgz", + "integrity": "sha512-wCT5GoExncHUzUbW8b9q/PN3uPsbxit4PUAHw/hkrIHDKOxd9H/ClM37ZeJHNEOml5hnJOPy+rOaF9jRqo8dGg==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-sdk-sts": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.428.0.tgz", + "integrity": "sha512-Uutl2niYXTnNP8v84v6umWDHD5no7d5/OqkZE1DsmeKR/dje90J5unJWf7MOsqvYm0JGDEWF4lk9xGVyqsw+Aw==", + "requires": { + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-signing": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.428.0.tgz", + "integrity": "sha512-oMSerTPwtsQAR7fIU/G0b0BA30wF+MC4gZSrJjbypF8MK8nPC2yMfKLR8+QavGOGEW7rUMQ0uklThMTTwQEXNQ==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.3.5", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-ssec": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.428.0.tgz", + "integrity": "sha512-QPKisAErRHFoopmdFhgOmjZPcUM6rvWCtnoEY4Sw9F0aIyK6yCTn+nB5j+3FAPvUvblE22srM6aow8TcGx1gjA==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-user-agent": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.428.0.tgz", + "integrity": "sha512-+GAhObeHRick2D5jr3YkPckjcggt5v6uUVtEUQW2AdD65cE5PjIvmksv6FuM/mME/9nNA+wufQnHbLI8teLeaw==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/region-config-resolver": { + "version": "3.430.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.430.0.tgz", + "integrity": "sha512-9lqgtkcd4dqsQ2yN6V/i06blyDh4yLmS+fAS7LwEZih/NZZ2cBIR+5kb9c236auvTcuMcL1zFxVRloWwesYZjA==", + "requires": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/types": "^2.3.5", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/signature-v4-multi-region": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.428.0.tgz", + "integrity": "sha512-ImuontXK1vEHtxK+qiPVfLTk/+bKSwYqrVkE2/o5rnsqD78/wySzTn5RnkA73Nb+UL4qSd0dkOcuubEee2aUpQ==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/token-providers": { + "version": "3.431.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.431.0.tgz", + "integrity": "sha512-0ksZogF3Gy2i+yBb7T2g2e7QXzwZeQHmf09ihR1cwXwg7UIjsap6P3gPtC085bDkOD9iY8OdpL0Esp06N6xmCg==", + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.430.0", + "@smithy/config-resolver": "^2.0.15", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.2", + "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.7", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/types": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.428.0.tgz", + "integrity": "sha512-4T0Ps2spjg3qbWE6ZK13Vd3FnzpfliaiotqjxUK5YhjDrKXeT36HJp46JhDupElQuHtTkpdiJOSYk2lvY2H4IA==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-arn-parser": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz", + "integrity": "sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==", + "requires": { + "tslib": "^2.5.0" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" + "@aws-sdk/util-endpoints": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.428.0.tgz", + "integrity": "sha512-ToKMhYlUWJ0YrbggpJLZeyZZNDXtQ4NITxqo/oeGltTT9KG4o/LqVY59EveV0f8P32ObDyj9Vh1mnjxeo3DxGw==", + "requires": { + "@aws-sdk/types": "3.428.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-locate-window": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.310.0.tgz", + "integrity": "sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==", + "requires": { + "tslib": "^2.5.0" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "optional": true, - "engines": { - "node": ">=6" + "@aws-sdk/util-user-agent-browser": { + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.428.0.tgz", + "integrity": "sha512-qlc2UoGsmCpuh1ErY3VayZuAGl74TWWcLmhhQMkeByFSb6KooBlwOmDpDzJRtgwJoe0KXnyHBO6lzl9iczcozg==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/types": "^2.3.5", + "bowser": "^2.11.0", + "tslib": "^2.5.0" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@aws-sdk/util-user-agent-node": { + "version": "3.430.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.430.0.tgz", + "integrity": "sha512-DPpFPL3mFMPtipFxjY7TKQBjnhmsPzYCr4Y+qna0oR6ij8jZOz2ILQDK33GxTRNh3+bV9YYbx+ZGDOnxoK5Mhw==", + "requires": { + "@aws-sdk/types": "3.428.0", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" } }, - "node_modules/zip-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", - "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", - "dependencies": { - "archiver-utils": "^2.1.0", - "compress-commons": "^4.1.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" + "@aws-sdk/util-utf8-browser": { + "version": "3.259.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "requires": { + "tslib": "^2.3.1" } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "peer": true, + }, + "@aws-sdk/xml-builder": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.310.0.tgz", + "integrity": "sha512-TqELu4mOuSIKQCqj63fGVs86Yh+vBx5nHRpWKNUNhB2nPTpfbziTs5c1X358be3peVWA4wPxW7Nt53KIg1tnNw==", "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "peer": true, - "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } + "tslib": "^2.5.0" } }, "@babel/code-frame": { @@ -9808,14 +11842,26 @@ } }, "@defillama/sdk": { - "version": "4.0.43", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-4.0.43.tgz", - "integrity": "sha512-SS311nPgkIOEbqWe3n2kT8n3UKyLQhQmJcEhlMhv6XnPhIBk4l7kLQXQmOYHpetAZmvUxOVnQwZbl75vh2EM5w==", + "version": "4.0.64", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-4.0.64.tgz", + "integrity": "sha512-wqM4enhx11vN5OuRNpK9QMoOEQbbQFKu7tT0rM6ddYA4w1tvuayWAn8mjfV8TN5wd88aHV4+zNY0Sps+mrVN9w==", "requires": { + "@aws-sdk/client-s3": "^3.400.0", "@supercharge/promise-pool": "^2.1.0", "ethers": "^5.4.5", "node-fetch": "^2.6.7", + "p-limit": "^3.0.0", "tron-format-address": "^0.1.11" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + } } }, "@eslint/eslintrc": { @@ -11145,6 +13191,492 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==" }, + "@smithy/abort-controller": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.11.tgz", + "integrity": "sha512-MSzE1qR2JNyb7ot3blIOT3O3H0Jn06iNDEgHRaqZUwBgx5EG+VIx24Y21tlKofzYryIOcWpIohLrIIyocD6LMA==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/chunked-blob-reader-native": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.0.tgz", + "integrity": "sha512-HM8V2Rp1y8+1343tkZUKZllFhEQPNmpNdgFAncbTsxkZ18/gqjk23XXv3qGyXWp412f3o43ZZ1UZHVcHrpRnCQ==", + "requires": { + "@smithy/util-base64": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/config-resolver": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.15.tgz", + "integrity": "sha512-a2Pfocla5nSrG2RyB8i20jcWgMyR71TUeFKm8pmrnZotr/X22tlg4y/EhSvBK2oTE8MKHlKh4YdpDO2AryJbGQ==", + "requires": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/types": "^2.3.5", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + } + }, + "@smithy/credential-provider-imds": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.17.tgz", + "integrity": "sha512-2XcD414yrwbxxuYueTo7tzLC2/w3jj9FZqfenpv3MQkocdOEmuOVS0v9WHsY/nW6V+2EcR340rj/z5HnvsHncQ==", + "requires": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/property-provider": "^2.0.12", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "tslib": "^2.5.0" + } + }, + "@smithy/eventstream-codec": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.11.tgz", + "integrity": "sha512-BQCTjxhCYRZIfXapa2LmZSaH8QUBGwMZw7XRN83hrdixbLjIcj+o549zjkedFS07Ve2TlvWUI6BTzP+nv7snBA==", + "requires": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.3.5", + "@smithy/util-hex-encoding": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/eventstream-serde-browser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.11.tgz", + "integrity": "sha512-p9IK4uvwT6B3pT1VGlODvcVBfPVikjBFHAcKpvvNF+7lAEI+YiC6d0SROPkpjnvCgVBYyGXa3ciqrWnFze6mwQ==", + "requires": { + "@smithy/eventstream-serde-universal": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/eventstream-serde-config-resolver": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.11.tgz", + "integrity": "sha512-vN32E8yExo0Z8L7kXhlU9KRURrhqOpPdLxQMp3MwfMThrjiqbr1Sk5srUXc1ed2Ygl/l0TEN9vwNG0bQHg6AjQ==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/eventstream-serde-node": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.11.tgz", + "integrity": "sha512-Gjqbpg7UmD+YzkpgNShNcDNZcUpBWIkvX2XCGptz5PoxJU/UQbuF9eSc93ZlIb7j4aGjtFfqk23HUMW8Hopg2Q==", + "requires": { + "@smithy/eventstream-serde-universal": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/eventstream-serde-universal": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.11.tgz", + "integrity": "sha512-F8FsxLTbFN4+Esgpo+nNKcEajrgRZJ+pG9c8+MhLM4Odp5ejLHw2GMCXd81cGsgmfcbnzdDEXazPPVzOwj89MQ==", + "requires": { + "@smithy/eventstream-codec": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/fetch-http-handler": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.3.tgz", + "integrity": "sha512-0G9sePU+0R+8d7cie+OXzNbbkjnD4RfBlVCs46ZEuQAMcxK8OniemYXSSkOc80CCk8Il4DnlYZcUSvsIs2OB2w==", + "requires": { + "@smithy/protocol-http": "^3.0.7", + "@smithy/querystring-builder": "^2.0.11", + "@smithy/types": "^2.3.5", + "@smithy/util-base64": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/hash-blob-browser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.11.tgz", + "integrity": "sha512-/6vq/NiH2EN3mWdwcLdjVohP+VCng+ZA1GnlUdx959egsfgIlLWQvCyjnB2ze9Hr6VHV5XEFLLpLQH2dHA6Sgw==", + "requires": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.0", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/hash-node": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.11.tgz", + "integrity": "sha512-PbleVugN2tbhl1ZoNWVrZ1oTFFas/Hq+s6zGO8B9bv4w/StTriTKA9W+xZJACOj9X7zwfoTLbscM+avCB1KqOQ==", + "requires": { + "@smithy/types": "^2.3.5", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/hash-stream-node": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.11.tgz", + "integrity": "sha512-Jn2yl+Dn0kvwKvSavvR1/BFVYa2wIkaJKWeTH48kno89gqHAJxMh1hrtBN6SJ7F8VhodNZTiNOlQVqCSfLheNQ==", + "requires": { + "@smithy/types": "^2.3.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/invalid-dependency": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.11.tgz", + "integrity": "sha512-zazq99ujxYv/NOf9zh7xXbNgzoVLsqE0wle8P/1zU/XdhPi/0zohTPKWUzIxjGdqb5hkkwfBkNkl5H+LE0mvgw==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/is-array-buffer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/md5-js": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.11.tgz", + "integrity": "sha512-YBIv+e95qeGvQA05ucwstmTeQ/bUzWgU+nO2Ffmif5awu6IzSR0Jfk3XLYh4mdy7f8DCgsn8qA63u7N9Lu0+5A==", + "requires": { + "@smithy/types": "^2.3.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/middleware-content-length": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.13.tgz", + "integrity": "sha512-Md2kxWpaec3bXp1oERFPQPBhOXCkGSAF7uc1E+4rkwjgw3/tqAXRtbjbggu67HJdwaif76As8AV6XxbD1HzqTQ==", + "requires": { + "@smithy/protocol-http": "^3.0.7", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/middleware-endpoint": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.2.tgz", + "integrity": "sha512-dua4r2EbSTRzNefz72snz+KDuXN73RCe1K+rGeemzUyYemxuh1jujFbLQbTU6DVlTgHkhtrbH0+kdOFY/SV4Qg==", + "requires": { + "@smithy/middleware-serde": "^2.0.11", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/shared-ini-file-loader": "^2.2.1", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-middleware": "^2.0.4", + "tslib": "^2.5.0" + } + }, + "@smithy/middleware-retry": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.17.tgz", + "integrity": "sha512-ZYVU1MmshCTbEKTNc5h7/Pps1vhH5C7hRclQWnAbVYKkIT+PEGu9dSVqprzEo/nlMA8Zv4Dj5Y+fv3pRnUwElw==", + "requires": { + "@smithy/node-config-provider": "^2.1.2", + "@smithy/protocol-http": "^3.0.7", + "@smithy/service-error-classification": "^2.0.4", + "@smithy/types": "^2.3.5", + "@smithy/util-middleware": "^2.0.4", + "@smithy/util-retry": "^2.0.4", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + } + }, + "@smithy/middleware-serde": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.11.tgz", + "integrity": "sha512-NuxnjMyf4zQqhwwdh0OTj5RqpnuT6HcH5Xg5GrPijPcKzc2REXVEVK4Yyk8ckj8ez1XSj/bCmJ+oNjmqB02GWA==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/middleware-stack": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.5.tgz", + "integrity": "sha512-bVQU/rZzBY7CbSxIrDTGZYnBWKtIw+PL/cRc9B7etZk1IKSOe0NvKMJyWllfhfhrTeMF6eleCzOihIQympAvPw==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/node-config-provider": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.2.tgz", + "integrity": "sha512-tbYh/JK/ddxKWYTtjLgap0juyivJ0wCvywMqINb54zyOVHoKYM6iYl7DosQA0owFaNp6GAx1lXFjqGz7L2fAqA==", + "requires": { + "@smithy/property-provider": "^2.0.12", + "@smithy/shared-ini-file-loader": "^2.2.1", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/node-http-handler": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.7.tgz", + "integrity": "sha512-PQIKZXlp3awCDn/xNlCSTFE7aYG/5Tx33M05NfQmWYeB5yV1GZZOSz4dXpwiNJYTXb9jPqjl+ueXXkwtEluFFA==", + "requires": { + "@smithy/abort-controller": "^2.0.11", + "@smithy/protocol-http": "^3.0.7", + "@smithy/querystring-builder": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/property-provider": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.12.tgz", + "integrity": "sha512-Un/OvvuQ1Kg8WYtoMCicfsFFuHb/TKL3pCA6ZIo/WvNTJTR94RtoRnL7mY4XkkUAoFMyf6KjcQJ76y1FX7S5rw==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/protocol-http": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.7.tgz", + "integrity": "sha512-HnZW8y+r66ntYueCDbLqKwWcMNWW8o3eVpSrHNluwtBJ/EUWfQHRKSiu6vZZtc6PGfPQWgVfucoCE/C3QufMAA==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/querystring-builder": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.11.tgz", + "integrity": "sha512-b4kEbVMxpmfv2VWUITn2otckTi7GlMteZQxi+jlwedoATOGEyrCJPfRcYQJjbCi3fZ2QTfh3PcORvB27+j38Yg==", + "requires": { + "@smithy/types": "^2.3.5", + "@smithy/util-uri-escape": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/querystring-parser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.11.tgz", + "integrity": "sha512-YXe7jhi7s3dQ0Fu9dLoY/gLu6NCyy8tBWJL/v2c9i7/RLpHgKT+uT96/OqZkHizCJ4kr0ZD46tzMjql/o60KLg==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/service-error-classification": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.4.tgz", + "integrity": "sha512-77506l12I5gxTZqBkx3Wb0RqMG81bMYLaVQ+EqIWFwQDJRs5UFeXogKxSKojCmz1wLUziHZQXm03MBzPQiumQw==", + "requires": { + "@smithy/types": "^2.3.5" + } + }, + "@smithy/shared-ini-file-loader": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.1.tgz", + "integrity": "sha512-eAYajwo2eTTVU5KPX90+V6ccfrWphrzcUwOt7n9pLOMBO0fOKlRVshbvCBqfRCxEn7OYDGH6TsL3yrx+hAjddA==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/signature-v4": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.11.tgz", + "integrity": "sha512-EFVU1dT+2s8xi227l1A9O27edT/GNKvyAK6lZnIZ0zhIHq/jSLznvkk15aonGAM1kmhmZBVGpI7Tt0odueZK9A==", + "requires": { + "@smithy/eventstream-codec": "^2.0.11", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.3.5", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-middleware": "^2.0.4", + "@smithy/util-uri-escape": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/smithy-client": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.11.tgz", + "integrity": "sha512-okjMbuBBCTiieK665OFN/ap6u9+Z9z55PMphS5FYCsS6Zfp137Q3qlnt0OgBAnUVnH/mNGyoJV0LBX9gkTWptg==", + "requires": { + "@smithy/middleware-stack": "^2.0.5", + "@smithy/types": "^2.3.5", + "@smithy/util-stream": "^2.0.16", + "tslib": "^2.5.0" + } + }, + "@smithy/types": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.5.tgz", + "integrity": "sha512-ehyDt8M9hehyxrLQGoA1BGPou8Js1Ocoh5M0ngDhJMqbFmNK5N6Xhr9/ZExWkyIW8XcGkiMPq3ZUEE0ScrhbuQ==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/url-parser": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.11.tgz", + "integrity": "sha512-h89yXMCCF+S5k9XIoKltMIWTYj+FcEkU/IIFZ6RtE222fskOTL4Iak6ZRG+ehSvZDt8yKEcxqheTDq7JvvtK3g==", + "requires": { + "@smithy/querystring-parser": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/util-base64": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.0.tgz", + "integrity": "sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==", + "requires": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/util-body-length-browser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz", + "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/util-body-length-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/util-buffer-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", + "requires": { + "@smithy/is-array-buffer": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/util-config-provider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", + "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/util-defaults-mode-browser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.15.tgz", + "integrity": "sha512-2raMZOYKSuke7QlDg/HDcxQdrp0zteJ8z+S0B9Rn23J55ZFNK1+IjG4HkN6vo/0u3Xy/JOdJ93ibiBSB8F7kOw==", + "requires": { + "@smithy/property-provider": "^2.0.12", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "@smithy/util-defaults-mode-node": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.20.tgz", + "integrity": "sha512-kJjcZ/Lzvs3sPDKBwlhZsFFcgPNIpB3CMb6/saCakawRzo0E+JkyS3ZZRjVR3ce29yHtwoP/0YLKC1PeH0Dffg==", + "requires": { + "@smithy/config-resolver": "^2.0.15", + "@smithy/credential-provider-imds": "^2.0.17", + "@smithy/node-config-provider": "^2.1.2", + "@smithy/property-provider": "^2.0.12", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/util-hex-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", + "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/util-middleware": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.4.tgz", + "integrity": "sha512-Pbu6P4MBwRcjrLgdTR1O4Y3c0sTZn2JdOiJNcgL7EcIStcQodj+6ZTXtbyU/WTEU3MV2NMA10LxFc3AWHZ3+4A==", + "requires": { + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/util-retry": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.4.tgz", + "integrity": "sha512-b+n1jBBKc77C1E/zfBe1Zo7S9OXGBiGn55N0apfhZHxPUP/fMH5AhFUUcWaJh7NAnah284M5lGkBKuhnr3yK5w==", + "requires": { + "@smithy/service-error-classification": "^2.0.4", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, + "@smithy/util-stream": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.16.tgz", + "integrity": "sha512-b5ZSRh1KzUzC7LoJcpfk7+iXGoRr3WylEfmPd4FnBLm90OwxSB9VgK1fDZwicfYxSEvWHdYXgvvjPtenEYBBhw==", + "requires": { + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/types": "^2.3.5", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/util-uri-escape": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", + "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", + "requires": { + "tslib": "^2.5.0" + } + }, + "@smithy/util-utf8": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.0.tgz", + "integrity": "sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==", + "requires": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@smithy/util-waiter": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.11.tgz", + "integrity": "sha512-8SJWUl9O1YhjC77EccgltI3q4XZQp3vp9DGEW6o0OdkUcwqm/H4qOLnMkA2n+NDojuM5Iia2jWoCdbluIiG7TA==", + "requires": { + "@smithy/abort-controller": "^2.0.11", + "@smithy/types": "^2.3.5", + "tslib": "^2.5.0" + } + }, "@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -11835,6 +14367,11 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "boxen": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", @@ -13427,6 +15964,14 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, + "fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "requires": { + "strnum": "^1.0.5" + } + }, "fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -15915,6 +18460,11 @@ "escape-string-regexp": "^1.0.2" } }, + "strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "strtok3": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", @@ -16152,9 +18702,9 @@ } }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type": { "version": "2.7.2", @@ -16580,9 +19130,7 @@ "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "peer": true + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" }, "zip-stream": { "version": "4.1.0", From 21d7c14dfb3a3ae08f976c657009e57c66f5fcb5 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Tue, 17 Oct 2023 17:06:08 -0500 Subject: [PATCH 08/28] Portal - added Sui support --- package-lock.json | 296 +++++++++++++++++++++++++++++++++ package.json | 1 + src/adapters/portal/index.ts | 6 + src/adapters/portal/sui.ts | 167 +++++++++++++++++++ src/adapters/portal/tests.ts | 93 +++++++++++ src/adapters/test.ts | 2 +- src/data/bridgeNetworkData.ts | 1 + src/handlers/checkDbEntries.ts | 4 +- src/helpers/sui.ts | 52 ++++++ src/utils/adapter.ts | 19 +-- src/utils/blocks.ts | 25 +++ src/utils/constants.ts | 1 + src/utils/normalizeChain.ts | 7 + src/utils/provider.ts | 10 ++ 14 files changed, 668 insertions(+), 16 deletions(-) create mode 100644 src/adapters/portal/sui.ts create mode 100644 src/helpers/sui.ts create mode 100644 src/utils/blocks.ts create mode 100644 src/utils/provider.ts diff --git a/package-lock.json b/package-lock.json index 5fda53ba..4d3ea536 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,6 +6,7 @@ "": { "dependencies": { "@defillama/sdk": "^4.0.43", + "@mysten/sui.js": "^0.44.0", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", @@ -2706,6 +2707,64 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, + "node_modules/@mysten/bcs": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.1.tgz", + "integrity": "sha512-wSEdP7QEfGQdb34g+7R0f3OdRqrv88iIABfJVDVJ6IsGLYVILreh8dZfNpZNUUyzctiyhX7zB9e/lR5qkddFPA==", + "dependencies": { + "bs58": "^5.0.0" + } + }, + "node_modules/@mysten/sui.js": { + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.44.0.tgz", + "integrity": "sha512-c/d1fKUCK6+QBQuIaufC79vbvNfx4KcEEO25F/NZFs3cQCoqgVrQC6wuv1P4lpqFOq3S9jhz2NrkIcU0yzkIOw==", + "dependencies": { + "@mysten/bcs": "0.8.1", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.1", + "@open-rpc/client-js": "^1.8.1", + "@scure/bip32": "^1.3.1", + "@scure/bip39": "^1.2.1", + "@suchipi/femver": "^1.0.0", + "events": "^3.3.0", + "superstruct": "^1.0.3", + "tweetnacl": "^1.0.3" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@mysten/sui.js/node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2738,6 +2797,58 @@ "node": ">= 8" } }, + "node_modules/@open-rpc/client-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", + "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", + "dependencies": { + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^5.0.0", + "strict-event-emitter-types": "^2.0.0", + "ws": "^7.0.0" + } + }, + "node_modules/@open-rpc/client-js/node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/@scure/base": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", + "integrity": "sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.2.tgz", + "integrity": "sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==", + "dependencies": { + "@noble/curves": "~1.2.0", + "@noble/hashes": "~1.3.2", + "@scure/base": "~1.1.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@serverless/dashboard-plugin": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/@serverless/dashboard-plugin/-/dashboard-plugin-6.2.2.tgz", @@ -3503,6 +3614,11 @@ "node": ">=14.0.0" } }, + "node_modules/@suchipi/femver": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz", + "integrity": "sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==" + }, "node_modules/@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -4239,6 +4355,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -4514,6 +4635,14 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, "node_modules/buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -7589,6 +7718,15 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "node_modules/isomorphic-ws": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", @@ -9777,6 +9915,11 @@ "is-stream": "^1.1.0" } }, + "node_modules/strict-event-emitter-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", + "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -9935,6 +10078,14 @@ "node": ">= 6" } }, + "node_modules/superstruct": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", + "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -10237,6 +10388,11 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, "node_modules/type": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", @@ -10562,6 +10718,11 @@ "node": ">=0.8.x" } }, + "node_modules/whatwg-fetch": { + "version": "3.6.19", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.19.tgz", + "integrity": "sha512-d67JP4dHSbm2TrpFj8AbO8DnL1JXL5J9u0Kq2xW6d0TFDbCA3Muhdt8orXC22utleTVj7Prqt82baN6RBvnEgw==" + }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -13034,6 +13195,51 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, + "@mysten/bcs": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.1.tgz", + "integrity": "sha512-wSEdP7QEfGQdb34g+7R0f3OdRqrv88iIABfJVDVJ6IsGLYVILreh8dZfNpZNUUyzctiyhX7zB9e/lR5qkddFPA==", + "requires": { + "bs58": "^5.0.0" + } + }, + "@mysten/sui.js": { + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.44.0.tgz", + "integrity": "sha512-c/d1fKUCK6+QBQuIaufC79vbvNfx4KcEEO25F/NZFs3cQCoqgVrQC6wuv1P4lpqFOq3S9jhz2NrkIcU0yzkIOw==", + "requires": { + "@mysten/bcs": "0.8.1", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.1", + "@open-rpc/client-js": "^1.8.1", + "@scure/bip32": "^1.3.1", + "@scure/bip39": "^1.2.1", + "@suchipi/femver": "^1.0.0", + "events": "^3.3.0", + "superstruct": "^1.0.3", + "tweetnacl": "^1.0.3" + }, + "dependencies": { + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + } + } + }, + "@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "requires": { + "@noble/hashes": "1.3.2" + } + }, + "@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -13057,6 +13263,49 @@ "fastq": "^1.6.0" } }, + "@open-rpc/client-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", + "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", + "requires": { + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^5.0.0", + "strict-event-emitter-types": "^2.0.0", + "ws": "^7.0.0" + }, + "dependencies": { + "isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "requires": {} + } + } + }, + "@scure/base": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", + "integrity": "sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==" + }, + "@scure/bip32": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.2.tgz", + "integrity": "sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==", + "requires": { + "@noble/curves": "~1.2.0", + "@noble/hashes": "~1.3.2", + "@scure/base": "~1.1.2" + } + }, + "@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "requires": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + } + }, "@serverless/dashboard-plugin": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/@serverless/dashboard-plugin/-/dashboard-plugin-6.2.2.tgz", @@ -13677,6 +13926,11 @@ "tslib": "^2.5.0" } }, + "@suchipi/femver": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz", + "integrity": "sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==" + }, "@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -14310,6 +14564,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -14485,6 +14744,14 @@ "update-browserslist-db": "^1.0.5" } }, + "bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "requires": { + "base-x": "^4.0.0" + } + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -16760,6 +17027,15 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "requires": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "isomorphic-ws": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", @@ -18385,6 +18661,11 @@ "is-stream": "^1.1.0" } }, + "strict-event-emitter-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", + "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -18504,6 +18785,11 @@ } } }, + "superstruct": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", + "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==" + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -18706,6 +18992,11 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, "type": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", @@ -18942,6 +19233,11 @@ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "peer": true }, + "whatwg-fetch": { + "version": "3.6.19", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.19.tgz", + "integrity": "sha512-d67JP4dHSbm2TrpFj8AbO8DnL1JXL5J9u0Kq2xW6d0TFDbCA3Muhdt8orXC22utleTVj7Prqt82baN6RBvnEgw==" + }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", diff --git a/package.json b/package.json index 468b698a..6cc27304 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "dependencies": { "@defillama/sdk": "^4.0.43", + "@mysten/sui.js": "^0.44.0", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", diff --git a/src/adapters/portal/index.ts b/src/adapters/portal/index.ts index e22534b0..1b03191c 100644 --- a/src/adapters/portal/index.ts +++ b/src/adapters/portal/index.ts @@ -6,6 +6,7 @@ import { EventData } from "../../utils/types"; import { getProvider } from "@defillama/sdk/build/general"; import { ethers } from "ethers"; import { PromisePool } from "@supercharge/promise-pool"; +import { getSuiEvents } from "./sui"; // Wormhole: Portal core and token bridge contract addresses // https://docs.wormhole.com/wormhole/blockchain-environments/environments @@ -58,6 +59,10 @@ const contractAddresses = { tokenBridge: "0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627", coreBridge: "0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6", }, + sui: { + tokenBridge: "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9", // object ID + coreBridge: "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c", // object ID + }, } as { [chain: string]: { tokenBridge: string; @@ -336,6 +341,7 @@ const adapter: BridgeAdapter = { optimism: constructParams("optimism"), arbitrum: constructParams("arbitrum"), base: constructParams("base"), + sui: getSuiEvents, }; export default adapter; diff --git a/src/adapters/portal/sui.ts b/src/adapters/portal/sui.ts new file mode 100644 index 00000000..bab94e64 --- /dev/null +++ b/src/adapters/portal/sui.ts @@ -0,0 +1,167 @@ +import { ethers } from "ethers"; +import { getClient, getTransactionBlocks } from "../../helpers/sui"; +import { EventData } from "../../utils/types"; +import { SuiEvent, SuiObjectChange } from "@mysten/sui.js/dist/cjs/client"; +import { normalizeSuiAddress, SUI_TYPE_ARG } from "@mysten/sui.js/utils"; + +const wormholeMessageEventType = + "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a::publish_message::WormholeMessage"; +const tokenBridgeAddress = "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9"; +const originalTokenBridgePackageId = "0x26efee2b51c911237888e5dc6702868abca3c7ac12c53f76ef8eba0697695e3d"; + +/** + * Retrieves Sui events from a given checkpoint range using the token bridge. + * Optimized to make as few RPC calls as possible. + * @param fromCheckpoint The starting checkpoint to retrieve events from. + * @param toCheckpoint The ending checkpoint to retrieve events from. + * @returns An array of EventData objects representing the events that occurred within the given checkpoint range. + */ +export const getSuiEvents = async (fromCheckpoint: number, toCheckpoint: number): Promise => { + const events: EventData[] = []; + const txBlocks = await getTransactionBlocks(fromCheckpoint, toCheckpoint, tokenBridgeAddress); + for (const txBlock of txBlocks) { + if ( + txBlock.effects?.status.status !== "success" || + !txBlock.checkpoint || + !txBlock.objectChanges || + txBlock.transaction?.data.transaction.kind !== "ProgrammableTransaction" + ) { + continue; + } + const transactions = txBlock.transaction.data.transaction.transactions; + for (const tx of transactions) { + const moveCall = "MoveCall" in tx && tx.MoveCall; + if (!moveCall || moveCall.package !== originalTokenBridgePackageId) { + continue; + } + if ( + (moveCall.module === "complete_transfer_with_payload" && moveCall.function === "authorize_transfer") || + (moveCall.module === "complete_transfer" && moveCall.function === "authorize_transfer") + ) { + const token = moveCall.type_arguments![0]; + // search backwards for the parse_and_verify call + const parseAndVerifyTx = transactions + .slice( + 0, + transactions.findIndex((value) => value === tx) + ) + .reverse() + .find( + (tx) => "MoveCall" in tx && tx.MoveCall.module === "vaa" && tx.MoveCall.function === "parse_and_verify" + ); + if (!parseAndVerifyTx || !("MoveCall" in parseAndVerifyTx)) { + continue; + } + const vaaArg = parseAndVerifyTx.MoveCall.arguments?.[1]; + if (!vaaArg || typeof vaaArg !== "object" || !("Input" in vaaArg)) { + continue; + } + const vaaInput = txBlock.transaction.data.transaction.inputs[vaaArg.Input]; + if (!vaaInput || vaaInput.type !== "pure" || vaaInput.valueType !== "vector") { + continue; + } + const vaa = Buffer.from(vaaInput.value as number[]); + const sigStart = 6; + const numSigners = vaa[5]; + const sigLength = 66; + const body = vaa.subarray(sigStart + sigLength * numSigners); + const payload = body.subarray(51); + const type = payload.readUInt8(0); + if (type !== 1 && type !== 3) { + continue; + } + const amount = await denormalizeAmount(token, ethers.BigNumber.from(payload.subarray(1, 33))); + const to = `0x${payload.subarray(67, 99).toString("hex")}`; + const event: EventData = { + blockNumber: Number(txBlock.checkpoint), + txHash: txBlock.digest, + // Wrapped tokens are minted from the zero address on Ethereum + // Override the from address to be the zero address for consistency + from: isWrappedToken(token, txBlock.objectChanges) ? ethers.constants.AddressZero : tokenBridgeAddress, + to, + token, + amount, + isDeposit: false, + }; + events.push(event); + } + if ( + ((moveCall.module === "transfer_tokens_with_payload" && moveCall.function === "transfer_tokens_with_payload") || + (moveCall.module === "transfer_tokens" && moveCall.function === "transfer_tokens")) && + txBlock.events + ) { + const token = tx.MoveCall.type_arguments![0]; + const payload = getWormholeMessagePayload(txBlock.events); + const originChain = payload.readUint16BE(65); + const toChain = payload.readUInt16BE(99); + const amount = await denormalizeAmount(token, ethers.BigNumber.from(payload.subarray(1, 33))); + const isWrapped = isWrappedToken(token, txBlock.objectChanges); + const event: EventData = { + blockNumber: Number(txBlock.checkpoint), + txHash: txBlock.digest, + from: txBlock.transaction.data.sender, + // if this is a wrapped token being burned and not being sent to its origin chain, + // then it should be included in the volume by fixing the to address + to: !isWrapped || originChain !== toChain ? tokenBridgeAddress : ethers.constants.AddressZero, + token, + amount, + isDeposit: !isWrapped, + }; + events.push(event); + } + } + } + return events; +}; + +const getWormholeMessagePayload = (events: SuiEvent[]): Buffer => { + const filtered = events.filter((event) => { + return event.type === wormholeMessageEventType; + }); + // TODO: support multiple transfers in a single txBlock + if (filtered.length !== 1) { + throw new Error(`Expected exactly one wormhole message event, found ${filtered.length}`); + } + return Buffer.from((filtered[0].parsedJson as any).payload); +}; + +const tokenDecimalsCache: { [token: string]: number } = {}; + +const getTokenDecimals = async (token: string): Promise => { + if (token in tokenDecimalsCache) { + return tokenDecimalsCache[token]; + } + const client = getClient(); + const coinMetadata = await client.getCoinMetadata({ coinType: token }); + if (coinMetadata === null) { + throw new Error(`Failed to get coin metadata for ${token}`); + } + const { decimals } = coinMetadata; + tokenDecimalsCache[token] = decimals; + return decimals; +}; + +const denormalizeAmount = async (token: string, amount: ethers.BigNumber): Promise => { + const decimals = await getTokenDecimals(token); + if (decimals > 8) { + return amount.mul(ethers.BigNumber.from(10).pow(decimals - 8)); + } + return amount; +}; + +const isWrappedToken = (token: string, objectChanges: SuiObjectChange[]) => { + const split = token.split("::"); + if (split.length !== 3) { + throw new Error(`Invalid token ${token}`); + } + const normalized = token === SUI_TYPE_ARG ? token : `${normalizeSuiAddress(split[0])}::${split[1]}::${split[2]}`; + const nativeKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::native_asset::NativeAsset<${normalized}>>`; + const wrappedKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::wrapped_asset::WrappedAsset<${normalized}>>`; + const value = objectChanges.find( + (change) => change.type === "mutated" && [nativeKey, wrappedKey].includes(change.objectType) + ); + if (!value) { + throw new Error(`Failed to find object change for token ${normalized}`); + } + return value.type === "mutated" && value.objectType === wrappedKey; +}; diff --git a/src/adapters/portal/tests.ts b/src/adapters/portal/tests.ts index 689be204..407d0ade 100644 --- a/src/adapters/portal/tests.ts +++ b/src/adapters/portal/tests.ts @@ -443,6 +443,98 @@ const testKlaytn = async () => { //); }; +const testSui = async () => { + // const events = await adapter["sui"](14_992_284, 16_081_978) + // console.log(events.length) + + // complete_transfer_with_payload (wrapped) + // https://suiexplorer.com/txblock/GWgFCab4BqtxXV2mFvMdM5deAkpKUPSqapT1AreoBh4Y + let checkpoint = 15736900; + let event = await getEvent(checkpoint, "sui"); + assertEqual( + { + blockNumber: checkpoint, + txHash: "GWgFCab4BqtxXV2mFvMdM5deAkpKUPSqapT1AreoBh4Y", + from: ethers.constants.AddressZero, + to: "0xc4c610707eab9b222996b075f7d07c7d9b07766ab7bcafef621fd53bbf089f4e", + token: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", + amount: ethers.BigNumber.from("34389000000"), + isDeposit: false, + }, + event + ); + + // complete_transfer (native) + // https://suiexplorer.com/txblock/2XrjjNwGXPzEDdHztJ7kG6E9wijiWK8sfQczhoT1V38Q + checkpoint = 16007453; + event = await getEvent(checkpoint, "sui"); + assertEqual( + { + blockNumber: checkpoint, + txHash: "2XrjjNwGXPzEDdHztJ7kG6E9wijiWK8sfQczhoT1V38Q", + from: "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9", + to: "0xd5c67d73166147f6fec91717187651966cc15c5caec2462dbbe380f44b21e87f", + token: "0x2::sui::SUI", + amount: ethers.BigNumber.from("10000000"), + isDeposit: false, + }, + event + ); + + // transfer_tokens_with_payload (wrapped - not sent to origin chain) + // https://suiexplorer.com/txblock/EqSqsc9pbo6hRgAhUyjn3nsKU51k6kEHd1v4DVBdvkyz + checkpoint = 15827121; + event = await getEvent(checkpoint, "sui"); + assertEqual( + { + blockNumber: checkpoint, + txHash: "EqSqsc9pbo6hRgAhUyjn3nsKU51k6kEHd1v4DVBdvkyz", + from: "0x161a9493ce468ee0fe56be02fe086eb47b650f76cbc8f7030a8f9b2bbcc7f3ac", + to: "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9", + token: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN", + amount: ethers.BigNumber.from("1000000"), + isDeposit: false, + }, + event + ); + + // transfer_tokens (wrapped - sent to origin chain) + // https://suiexplorer.com/txblock/2Dc96jf7PSJeA9kcLxUyTZMsSwsEtTDMrYdabqDpuZAS + checkpoint = 16005422; + event = await getEvent(checkpoint, "sui"); + assertEqual( + { + blockNumber: checkpoint, + txHash: "2Dc96jf7PSJeA9kcLxUyTZMsSwsEtTDMrYdabqDpuZAS", + from: "0xd5c67d73166147f6fec91717187651966cc15c5caec2462dbbe380f44b21e87f", + to: ethers.constants.AddressZero, + token: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8::coin::COIN", + amount: ethers.BigNumber.from("1000000"), + isDeposit: false, + }, + event + ); + + // transfer_tokens (native) + // https://suiexplorer.com/txblock/9ePHxgVdKFoYGnE4nMg3bxiShmYq9yuYKdENEtwDKVwm + checkpoint = 15991909; + event = await getEvent(checkpoint, "sui"); + assertEqual( + { + blockNumber: checkpoint, + txHash: "9ePHxgVdKFoYGnE4nMg3bxiShmYq9yuYKdENEtwDKVwm", + from: "0xbda9efe864e492f5921f30287a10f60287eafdcc82f259a39bb2335fb069a948", + to: "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9", + token: "0x2::sui::SUI", + amount: ethers.BigNumber.from("2100000000"), + isDeposit: true, + }, + event + ); + + console.log("sui tests passed"); +}; + (async () => { await Promise.all([ testNoEventsFound(), @@ -457,5 +549,6 @@ const testKlaytn = async () => { testAvalanche(), testOptimism(), testKlaytn(), + testSui(), ]); })(); diff --git a/src/adapters/test.ts b/src/adapters/test.ts index 2ebc7c9e..17b23021 100644 --- a/src/adapters/test.ts +++ b/src/adapters/test.ts @@ -1,4 +1,4 @@ -import { getLatestBlock } from "@defillama/sdk/build/util"; +import { getLatestBlock } from "../utils/blocks"; import { Chain } from "@defillama/sdk/build/general"; import adapters from "./"; import { importBridgeNetwork } from "../data/importBridgeNetwork"; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 47be655e..934a2bef 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -140,6 +140,7 @@ export default [ "Optimism", "Arbitrum", "Base", + "Sui" ], chainMapping: { avalanche: "avax", // this is needed temporarily, need to fix and remove diff --git a/src/handlers/checkDbEntries.ts b/src/handlers/checkDbEntries.ts index 913abf7a..91864add 100644 --- a/src/handlers/checkDbEntries.ts +++ b/src/handlers/checkDbEntries.ts @@ -1,5 +1,5 @@ import { wrapScheduledLambda } from "../utils/wrap"; -import { getLatestBlock } from "@defillama/sdk/build/util"; +import { getLatestBlockNumber } from "../utils/blocks"; import { queryAggregatedHourlyTimestampRange, queryAggregatedDailyTimestampRange, @@ -73,7 +73,7 @@ export default wrapScheduledLambda(async (_event) => { Object.keys(recordedBlocks).map(async (adapter: any) => { const chain = adapter.split(":")[1]; if (!latestChainBlocks[chain]) { - latestChainBlocks[chain] = (await getLatestBlock(chain)).number; + latestChainBlocks[chain] = await getLatestBlockNumber(chain); } }) ); diff --git a/src/helpers/sui.ts b/src/helpers/sui.ts new file mode 100644 index 00000000..3b6776f4 --- /dev/null +++ b/src/helpers/sui.ts @@ -0,0 +1,52 @@ +import { + SuiClient, + SuiTransactionBlockResponse, + getFullnodeUrl, + PaginatedTransactionResponse, +} from "@mysten/sui.js/client"; + +export const getClient = () => { + const url = process.env.SUI_RPC ?? getFullnodeUrl("mainnet"); + return new SuiClient({ url }); +}; + +export const getTransactionBlocks = async ( + fromCheckpoint: number, + toCheckpoint: number, + changedObject: string +): Promise => { + const client = getClient(); + const results: SuiTransactionBlockResponse[] = []; + let hasNextPage = false; + let cursor: string | null | undefined = undefined; + let oldestCheckpoint: string | null = null; + do { + // TODO: The public RPC doesn't support fetching events by chaining filters with a `TimeRange` filter, + // so we have to search backwards for our checkpoint range + const response: PaginatedTransactionResponse = await client.queryTransactionBlocks({ + filter: { ChangedObject: changedObject }, + cursor, + options: { + showEffects: true, + showEvents: true, + showInput: true, + showObjectChanges: true, + }, + }); + for (const txBlock of response.data) { + const checkpoint = txBlock.checkpoint; + if (!checkpoint) { + continue; + } + if (checkpoint >= fromCheckpoint.toString() && checkpoint <= toCheckpoint.toString()) { + results.push(txBlock); + } + if (oldestCheckpoint === null || checkpoint < oldestCheckpoint) { + oldestCheckpoint = checkpoint; + } + } + hasNextPage = response.hasNextPage; + cursor = response.nextCursor; + } while (hasNextPage && cursor && oldestCheckpoint && oldestCheckpoint >= fromCheckpoint.toString()); + return results; +}; diff --git a/src/utils/adapter.ts b/src/utils/adapter.ts index b7e5b406..de764f79 100644 --- a/src/utils/adapter.ts +++ b/src/utils/adapter.ts @@ -1,5 +1,5 @@ -import { getLatestBlock, getTimestamp } from "@defillama/sdk/build/util"; -import { Chain, getProvider } from "@defillama/sdk/build/general"; +import { getLatestBlockNumber } from "./blocks"; +import { Chain } from "@defillama/sdk/build/general"; import { sql } from "./db"; import { getBridgeID } from "./wrappa/postgres/query"; import { insertTransactionRow, insertConfigRow, insertErrorRow } from "./wrappa/postgres/write"; @@ -12,10 +12,9 @@ import { getCurrentUnixTimestamp } from "./date"; import type { RecordedBlocks } from "./types"; import { wait } from "../helpers/etherscan"; import { lookupBlock } from "@defillama/sdk/build/util"; -import { tronGetLatestBlock } from "../helpers/tron"; import { BridgeNetwork } from "../data/types"; import { groupBy } from "lodash"; -import { getBlock } from "@defillama/sdk/build/computeTVL/blocks"; +import { getProvider } from "./provider"; const axios = require("axios"); const retry = require("async-retry"); @@ -37,13 +36,7 @@ const getBlocksForRunningAdapter = async ( let useRecordedBlocks = undefined; if (useChainBlocks) { // probably need timeouts here - if (chainContractsAreOn === "tron") { - const { number } = await tronGetLatestBlock(); - endBlock = number; - } else { - const { number } = await getLatestBlock(chainContractsAreOn); - endBlock = number; - } + endBlock = await getLatestBlockNumber(chainContractsAreOn); if (!endBlock) { const errString = `Unable to get blocks for ${bridgeDbName} adapter on chain ${chainContractsAreOn}.`; await insertErrorRow({ @@ -296,8 +289,8 @@ export const runAllAdaptersTimestampRange = async ( const chainContractsAreOn = bridgeNetwork.chainMapping?.[chain as Chain] ? bridgeNetwork.chainMapping?.[chain as Chain] : chain; - if (chainContractsAreOn === "tron") { - console.info(`Skipping running adapter ${bridgeDbName} on chain Tron.`); + if (chainContractsAreOn === "tron" || chainContractsAreOn === "sui") { + console.info(`Skipping running adapter ${bridgeDbName} on chain ${chainContractsAreOn}.`); return; } const useChainBlocks = !(nonBlocksChains.includes(chainContractsAreOn) || ["ibc"].includes(bridgeDbName)); diff --git a/src/utils/blocks.ts b/src/utils/blocks.ts new file mode 100644 index 00000000..5cd0beba --- /dev/null +++ b/src/utils/blocks.ts @@ -0,0 +1,25 @@ +import { getLatestBlock as getLatestBlockSdk } from "@defillama/sdk/build/util"; +import { getClient } from "../helpers/sui"; +import { tronGetLatestBlock } from "../helpers/tron"; + +export async function getLatestBlockNumber(chain: string): Promise { + if (chain === "sui") { + const client = getClient(); + return Number(await client.getLatestCheckpointSequenceNumber()); + } else if (chain === "tron") { + return (await tronGetLatestBlock()).number; + } + return (await getLatestBlockSdk(chain)).number; +} + +export async function getLatestBlock(chain: string): Promise<{ number: number; timestamp: number }> { + if (chain === "sui") { + const client = getClient(); + const seqNumber = await client.getLatestCheckpointSequenceNumber(); + const { timestampMs } = await client.getCheckpoint({ id: seqNumber }); + return { number: Number(seqNumber), timestamp: Number(timestampMs) }; + } else if (chain === "tron") { + return await tronGetLatestBlock(); + } + return await getLatestBlock(chain); +} diff --git a/src/utils/constants.ts b/src/utils/constants.ts index c2d18ed7..a154a1d0 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -17,6 +17,7 @@ export const maxBlocksToQueryByChain = { aurora: 5400, celo: 1200, klaytn: 6000, + sui: 2400, // sui creates a checkpoint about every 3 seconds } as { [chain: string]: number }; export const nonBlocksChains = [ diff --git a/src/utils/normalizeChain.ts b/src/utils/normalizeChain.ts index d9cd356b..861d38df 100644 --- a/src/utils/normalizeChain.ts +++ b/src/utils/normalizeChain.ts @@ -119,6 +119,11 @@ export const chainCoingeckoIds = { symbol: "SOL", cmcId: "5426", }, + Sui: { + geckoId: "sui", + symbol: "SUI", + cmcId: "20947", + }, Polygon: { geckoId: "matic-network", symbol: "MATIC", @@ -1117,6 +1122,8 @@ export function getChainDisplayName(normalizedChain: string, useNewChainNames: b return "Axelar"; case "zkSync Era": return "zkSync Era"; + case "sui": + return "Sui"; default: return normalizedChain.slice(0, 1).toUpperCase() + normalizedChain.slice(1); // Capitalize first letter } diff --git a/src/utils/provider.ts b/src/utils/provider.ts new file mode 100644 index 00000000..96cd2c77 --- /dev/null +++ b/src/utils/provider.ts @@ -0,0 +1,10 @@ +import { getClient } from "../helpers/sui"; +import { getProvider as getLlamaProvider } from "@defillama/sdk"; + +export function getProvider(chain: string) { + if (chain === "sui") { + return getClient(); + } + + return getLlamaProvider(chain); +} From f6a5f18b0fcdced4eb73a7461c17788fae02caf5 Mon Sep 17 00:00:00 2001 From: vrtnd Date: Mon, 23 Oct 2023 16:12:24 +0300 Subject: [PATCH 09/28] fix sui --- src/utils/blocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/blocks.ts b/src/utils/blocks.ts index 5cd0beba..936f72af 100644 --- a/src/utils/blocks.ts +++ b/src/utils/blocks.ts @@ -21,5 +21,5 @@ export async function getLatestBlock(chain: string): Promise<{ number: number; t } else if (chain === "tron") { return await tronGetLatestBlock(); } - return await getLatestBlock(chain); + return await getLatestBlockSdk(chain); } From 21d628e8c26e0f52765613acc2e6b5d1100f2571 Mon Sep 17 00:00:00 2001 From: Stupid Boar Date: Tue, 24 Oct 2023 13:50:30 +0300 Subject: [PATCH 10/28] Add PepeTeam Bridge --- src/adapters/index.ts | 2 + src/adapters/pepeteam-bridge/index.ts | 132 ++++++++++++++++++++++++++ src/data/bridgeNetworkData.ts | 9 ++ 3 files changed, 143 insertions(+) create mode 100644 src/adapters/pepeteam-bridge/index.ts diff --git a/src/adapters/index.ts b/src/adapters/index.ts index a730ae62..dd0e59e0 100644 --- a/src/adapters/index.ts +++ b/src/adapters/index.ts @@ -38,6 +38,7 @@ import manta from "./manta"; import squidrouter from "./squid"; import eywa from "./eywa"; import rhinofi from './rhinofi'; +import pepeteam_bridge from './pepeteam-bridge'; export default { polygon, @@ -78,6 +79,7 @@ export default { manta, eywa, rhinofi, + pepeteam_bridge, } as { [bridge: string]: BridgeAdapter; }; diff --git a/src/adapters/pepeteam-bridge/index.ts b/src/adapters/pepeteam-bridge/index.ts new file mode 100644 index 00000000..3e5d732e --- /dev/null +++ b/src/adapters/pepeteam-bridge/index.ts @@ -0,0 +1,132 @@ +import { BridgeAdapter, ContractEventParams } from "../../helpers/bridgeAdapter.type"; +import { getTxDataFromEVMEventLogs } from "../../helpers/processTransactions"; + +const PROJECT_NAME = "pepeteam-bridge"; + +enum Chain { + Ethereum = "ethereum", + BSC = "bsc", + Polygon = "polygon", +} + +const contractAddresses = { + [Chain.Ethereum]: { + coin: "0x882260324AD5A87bF5007904B4A8EF87023c856A", + erc20: "0x0de7b091A21BD439bdB2DfbB63146D9cEa21Ea83", + }, + [Chain.BSC]: { + coin: "0xF1632012f6679Fcf464721433AFAAe9c11ad9e03", + erc20: "0x8DF12786EC0E34e60D4c52f9052ba4e536e9367a", + }, + [Chain.Polygon]: { + coin: "0xEa3cc73165748AD1Ca76b4d1bA9ebC43fb399018", + erc20: "0xF57dB884606a0ed589c06320d9004FBeD4f81e4A", + }, +}; + +const coinPriceAddresses = { + [Chain.Ethereum]: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH + [Chain.BSC]: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", // WBNB + [Chain.Polygon]: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", // WMATIC +} + +const lockCoinEVMEventParams = (chain: Chain): ContractEventParams => { + return { + target: contractAddresses[chain].coin, + topic: "LockTokens(uint16,uint256,string,uint256,string,uint256,uint256)", + abi: ["event LockTokens(uint16 feeChainId, uint256 amount, string recipient, uint256 gaslessReward, string referrer, uint256 referrerFee, uint256 fee)"], + logKeys: { + blockNumber: "blockNumber", + txHash: "transactionHash", + }, + argKeys: { + to: "recipient", + amount: "amount", + }, + fixedEventData: { + from: "", + token: coinPriceAddresses[chain] + }, + isDeposit: true, + }; +}; + +const releaseCoinEVMEventParams = (chain: Chain): ContractEventParams => { + return { + target: contractAddresses[chain].coin, + topic: "ReleaseTokens(uint256,address,uint256,address)", + abi: ["event ReleaseTokens(uint256 amount, address recipient, uint256 gaslessReward, address caller)"], + logKeys: { + blockNumber: "blockNumber", + txHash: "transactionHash", + }, + argKeys: { + to: "recipient", + amount: "amount", + }, + fixedEventData: { + from: "", + token: coinPriceAddresses[chain] + }, + isDeposit: false, + }; +}; + +const lockERC20EVMEventParams = (chain: Chain): ContractEventParams => { + return { + target: contractAddresses[chain].erc20, + topic: "LockTokens(uint16,address,uint256,string,uint256,string,uint256,uint256)", + abi: ["event LockTokens(uint16 feeChainId, address token, uint256 amount, string recipient, uint256 gaslessReward, string referrer, uint256 referrerFee, uint256 fee)"], + logKeys: { + blockNumber: "blockNumber", + txHash: "transactionHash", + }, + argKeys: { + to: "recipient", + amount: "amount", + token: "token", + }, + fixedEventData: { + from: "", + }, + isDeposit: true, + }; +}; + +const releaseERC20EVMEventParams = (chain: Chain): ContractEventParams => { + return { + target: contractAddresses[chain].erc20, + topic: "ReleaseTokens(address,uint256,address,uint256,address)", + abi: ["event ReleaseTokens(address token, uint256 amount, address recipient, uint256 gaslessReward, address caller)"], + logKeys: { + blockNumber: "blockNumber", + txHash: "transactionHash", + }, + argKeys: { + to: "recipient", + amount: "amount", + token: "token", + }, + fixedEventData: { + from: "", + }, + isDeposit: false, + }; +}; + +const constructEvmParams = (chain: Chain): ContractEventParams[] => [lockCoinEVMEventParams(chain), releaseCoinEVMEventParams(chain), lockERC20EVMEventParams(chain), releaseERC20EVMEventParams(chain)] + +const constructParams = (chain: Chain) => { + let eventParams: ContractEventParams[] = constructEvmParams(chain); + + return async (fromBlock: number, toBlock: number) => + getTxDataFromEVMEventLogs(PROJECT_NAME, chain, fromBlock, toBlock, eventParams); +}; + +const adapter: BridgeAdapter = { + [Chain.Ethereum]: constructParams(Chain.Ethereum), + [Chain.BSC]: constructParams(Chain.BSC), + [Chain.Polygon]: constructParams(Chain.Polygon), +}; + +export default adapter; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 934a2bef..8a63cc5d 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -619,4 +619,13 @@ export default [ // avalanche: "avax", // }, // }, + { + id: 41, + displayName: "PepeTeam Bridge", + bridgeDbName: "pepeteam_bridge", + iconLink: "protocols:pepeteam-bridge", + largeTxThreshold: 10000, + url: "https://bridge.pepe.team", + chains: ["Ethereum", "BSC", "Polygon"], + }, ] as BridgeNetwork[]; From dcb3b0500e82573858e25aad2b344c87488dae20 Mon Sep 17 00:00:00 2001 From: Stupid Boar Date: Tue, 24 Oct 2023 14:32:48 +0300 Subject: [PATCH 11/28] Add destination chain --- src/data/bridgeNetworkData.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 8a63cc5d..3267867a 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -627,5 +627,6 @@ export default [ largeTxThreshold: 10000, url: "https://bridge.pepe.team", chains: ["Ethereum", "BSC", "Polygon"], + destinationChain: "Waves", }, ] as BridgeNetwork[]; From 83910b4983a66ac615dacea7f0afd23432b3d314 Mon Sep 17 00:00:00 2001 From: vrtnd Date: Wed, 25 Oct 2023 19:38:01 +0300 Subject: [PATCH 12/28] Add wanbridge --- src/data/bridgeNetworkData.ts | 70 +++++++++++++++++------------------ 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 934a2bef..9fd1c5ba 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -140,7 +140,6 @@ export default [ "Optimism", "Arbitrum", "Base", - "Sui" ], chainMapping: { avalanche: "avax", // this is needed temporarily, need to fix and remove @@ -578,45 +577,44 @@ export default [ iconLink: "icons:rhino.fi", largeTxThreshold: 10000, url: "", - chains: ["Arbitrum", "Arbitrum Nova", "BSC", "Polygon", "Optimism", "Base", "zkSync Era", "Polygon zkEVM", "Linea", "Scroll"], + chains: [ + "Arbitrum", + "Arbitrum Nova", + "BSC", + "Polygon", + "Optimism", + "Base", + "zkSync Era", + "Polygon zkEVM", + "Linea", + "Scroll", + ], chainMapping: { "arbitrum nova": "arbitrum_nova", "zksync era": "era", "polygon zkevm": "polygon_zkevm", }, }, - // { - // id: 40, - // displayName: "WanBridge", - // bridgeDbName: "wanbridge", - // iconLink: "icons:wanbridge", - // largeTxThreshold: 10000, - // url: "https://bridge.wanchain.org", - // chains: [ - // "Ethereum", - // "Polygon", - // "Fantom", - // "Avalanche", - // "Arbitrum", - // "Optimism", - // "BSC", - // "Moonbeam", - // "Moonriver", - // "FunctionX", - // "Telos", - // "Okexchain", - // "Horizen", - // "Metis", - // "Astar", - // "Vinuchain", - // "Tron", - // "Wanchain", - // "Clover", - // "Gather", - // "XDC", - // ], - // chainMapping: { - // avalanche: "avax", - // }, - // }, + { + id: 41, + displayName: "WanBridge", + bridgeDbName: "wanbridge", + iconLink: "icons:wanbridge", + largeTxThreshold: 10000, + url: "https://bridge.wanchain.org", + chains: [ + "Ethereum", + "Polygon", + "Fantom", + "Avalanche", + "Arbitrum", + "Optimism", + "BSC", + "Moonbeam", + "Moonriver", + "Telos", + "Metis", + "Astar", + ], + }, ] as BridgeNetwork[]; From be3d3ba03f42ef94cfb974033fcaed4dc73542a9 Mon Sep 17 00:00:00 2001 From: vrtnd Date: Wed, 25 Oct 2023 20:26:06 +0300 Subject: [PATCH 13/28] fix --- package-lock.json | 312 +------------------------------- package.json | 3 +- src/adapters/portal/index.ts | 2 - src/adapters/wanbridge/index.ts | 61 ++++--- src/data/bridgeNetworkData.ts | 15 ++ src/helpers/sui.ts | 100 +++++----- src/utils/blocks.ts | 14 +- src/utils/provider.ts | 4 +- tsconfig.json | 2 +- 9 files changed, 116 insertions(+), 397 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4d3ea536..09aacba7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,11 @@ { - "name": "bridges-server", + "name": "bridges_server", "lockfileVersion": 2, "requires": true, "packages": { "": { "dependencies": { - "@defillama/sdk": "^4.0.43", - "@mysten/sui.js": "^0.44.0", + "@defillama/sdk": "^4.0.64", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", @@ -2707,64 +2706,6 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, - "node_modules/@mysten/bcs": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.1.tgz", - "integrity": "sha512-wSEdP7QEfGQdb34g+7R0f3OdRqrv88iIABfJVDVJ6IsGLYVILreh8dZfNpZNUUyzctiyhX7zB9e/lR5qkddFPA==", - "dependencies": { - "bs58": "^5.0.0" - } - }, - "node_modules/@mysten/sui.js": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.44.0.tgz", - "integrity": "sha512-c/d1fKUCK6+QBQuIaufC79vbvNfx4KcEEO25F/NZFs3cQCoqgVrQC6wuv1P4lpqFOq3S9jhz2NrkIcU0yzkIOw==", - "dependencies": { - "@mysten/bcs": "0.8.1", - "@noble/curves": "^1.1.0", - "@noble/hashes": "^1.3.1", - "@open-rpc/client-js": "^1.8.1", - "@scure/bip32": "^1.3.1", - "@scure/bip39": "^1.2.1", - "@suchipi/femver": "^1.0.0", - "events": "^3.3.0", - "superstruct": "^1.0.3", - "tweetnacl": "^1.0.3" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@mysten/sui.js/node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", - "dependencies": { - "@noble/hashes": "1.3.2" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2797,58 +2738,6 @@ "node": ">= 8" } }, - "node_modules/@open-rpc/client-js": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", - "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", - "dependencies": { - "isomorphic-fetch": "^3.0.0", - "isomorphic-ws": "^5.0.0", - "strict-event-emitter-types": "^2.0.0", - "ws": "^7.0.0" - } - }, - "node_modules/@open-rpc/client-js/node_modules/isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/@scure/base": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", - "integrity": "sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.2.tgz", - "integrity": "sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==", - "dependencies": { - "@noble/curves": "~1.2.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.2" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "dependencies": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@serverless/dashboard-plugin": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/@serverless/dashboard-plugin/-/dashboard-plugin-6.2.2.tgz", @@ -3614,11 +3503,6 @@ "node": ">=14.0.0" } }, - "node_modules/@suchipi/femver": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz", - "integrity": "sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==" - }, "node_modules/@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -3739,9 +3623,9 @@ "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==" }, "node_modules/@types/node": { - "version": "18.6.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.4.tgz", - "integrity": "sha512-I4BD3L+6AWiUobfxZ49DlU43gtI+FTHSv9pE2Zekg6KjMpre4ByusaljW3vYSLJrvQ1ck1hUaeVu8HVlY3vzHg==" + "version": "18.18.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", + "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==" }, "node_modules/@types/node-fetch": { "version": "2.6.2", @@ -4355,11 +4239,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -4635,14 +4514,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dependencies": { - "base-x": "^4.0.0" - } - }, "node_modules/buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -7718,15 +7589,6 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, - "node_modules/isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, "node_modules/isomorphic-ws": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", @@ -9915,11 +9777,6 @@ "is-stream": "^1.1.0" } }, - "node_modules/strict-event-emitter-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", - "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -10078,14 +9935,6 @@ "node": ">= 6" } }, - "node_modules/superstruct": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", - "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -10388,11 +10237,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, "node_modules/type": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", @@ -10718,11 +10562,6 @@ "node": ">=0.8.x" } }, - "node_modules/whatwg-fetch": { - "version": "3.6.19", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.19.tgz", - "integrity": "sha512-d67JP4dHSbm2TrpFj8AbO8DnL1JXL5J9u0Kq2xW6d0TFDbCA3Muhdt8orXC22utleTVj7Prqt82baN6RBvnEgw==" - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -13195,51 +13034,6 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, - "@mysten/bcs": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.1.tgz", - "integrity": "sha512-wSEdP7QEfGQdb34g+7R0f3OdRqrv88iIABfJVDVJ6IsGLYVILreh8dZfNpZNUUyzctiyhX7zB9e/lR5qkddFPA==", - "requires": { - "bs58": "^5.0.0" - } - }, - "@mysten/sui.js": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.44.0.tgz", - "integrity": "sha512-c/d1fKUCK6+QBQuIaufC79vbvNfx4KcEEO25F/NZFs3cQCoqgVrQC6wuv1P4lpqFOq3S9jhz2NrkIcU0yzkIOw==", - "requires": { - "@mysten/bcs": "0.8.1", - "@noble/curves": "^1.1.0", - "@noble/hashes": "^1.3.1", - "@open-rpc/client-js": "^1.8.1", - "@scure/bip32": "^1.3.1", - "@scure/bip39": "^1.2.1", - "@suchipi/femver": "^1.0.0", - "events": "^3.3.0", - "superstruct": "^1.0.3", - "tweetnacl": "^1.0.3" - }, - "dependencies": { - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - } - } - }, - "@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", - "requires": { - "@noble/hashes": "1.3.2" - } - }, - "@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" - }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -13263,49 +13057,6 @@ "fastq": "^1.6.0" } }, - "@open-rpc/client-js": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", - "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", - "requires": { - "isomorphic-fetch": "^3.0.0", - "isomorphic-ws": "^5.0.0", - "strict-event-emitter-types": "^2.0.0", - "ws": "^7.0.0" - }, - "dependencies": { - "isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "requires": {} - } - } - }, - "@scure/base": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", - "integrity": "sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==" - }, - "@scure/bip32": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.2.tgz", - "integrity": "sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==", - "requires": { - "@noble/curves": "~1.2.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.2" - } - }, - "@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "requires": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - } - }, "@serverless/dashboard-plugin": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/@serverless/dashboard-plugin/-/dashboard-plugin-6.2.2.tgz", @@ -13926,11 +13677,6 @@ "tslib": "^2.5.0" } }, - "@suchipi/femver": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz", - "integrity": "sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==" - }, "@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -14045,9 +13791,9 @@ "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==" }, "@types/node": { - "version": "18.6.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.4.tgz", - "integrity": "sha512-I4BD3L+6AWiUobfxZ49DlU43gtI+FTHSv9pE2Zekg6KjMpre4ByusaljW3vYSLJrvQ1ck1hUaeVu8HVlY3vzHg==" + "version": "18.18.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", + "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==" }, "@types/node-fetch": { "version": "2.6.2", @@ -14564,11 +14310,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -14744,14 +14485,6 @@ "update-browserslist-db": "^1.0.5" } }, - "bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "requires": { - "base-x": "^4.0.0" - } - }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -17027,15 +16760,6 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, - "isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "requires": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, "isomorphic-ws": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", @@ -18661,11 +18385,6 @@ "is-stream": "^1.1.0" } }, - "strict-event-emitter-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", - "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" - }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -18785,11 +18504,6 @@ } } }, - "superstruct": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", - "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==" - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -18992,11 +18706,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, "type": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", @@ -19233,11 +18942,6 @@ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "peer": true }, - "whatwg-fetch": { - "version": "3.6.19", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.19.tgz", - "integrity": "sha512-d67JP4dHSbm2TrpFj8AbO8DnL1JXL5J9u0Kq2xW6d0TFDbCA3Muhdt8orXC22utleTVj7Prqt82baN6RBvnEgw==" - }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", diff --git a/package.json b/package.json index 6cc27304..155f6e12 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "ts-loader": "^9.3.1" }, "dependencies": { - "@defillama/sdk": "^4.0.43", - "@mysten/sui.js": "^0.44.0", + "@defillama/sdk": "^4.0.64", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", diff --git a/src/adapters/portal/index.ts b/src/adapters/portal/index.ts index 1b03191c..2cfc3e01 100644 --- a/src/adapters/portal/index.ts +++ b/src/adapters/portal/index.ts @@ -6,7 +6,6 @@ import { EventData } from "../../utils/types"; import { getProvider } from "@defillama/sdk/build/general"; import { ethers } from "ethers"; import { PromisePool } from "@supercharge/promise-pool"; -import { getSuiEvents } from "./sui"; // Wormhole: Portal core and token bridge contract addresses // https://docs.wormhole.com/wormhole/blockchain-environments/environments @@ -341,7 +340,6 @@ const adapter: BridgeAdapter = { optimism: constructParams("optimism"), arbitrum: constructParams("arbitrum"), base: constructParams("base"), - sui: getSuiEvents, }; export default adapter; diff --git a/src/adapters/wanbridge/index.ts b/src/adapters/wanbridge/index.ts index c48a4150..090156b5 100644 --- a/src/adapters/wanbridge/index.ts +++ b/src/adapters/wanbridge/index.ts @@ -20,82 +20,83 @@ enum Chains { horizen = "horizen", fantom = "fantom", clover = "clover", - gather = "gather", + gather = "gth", tron = "tron", - vinuchain = "vinuchain", + vinuchain = "vinu", } - const contractAddresses = { [Chains.arbitrum]: { - portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613" + portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613", }, [Chains.wanchain]: { - portal: "0xe85b0d89cbc670733d6a40a9450d8788be13da47" + portal: "0xe85b0d89cbc670733d6a40a9450d8788be13da47", }, [Chains.ethereum]: { - portal: "0xfceaaaeb8d564a9d0e71ef36f027b9d162bc334e" + portal: "0xfceaaaeb8d564a9d0e71ef36f027b9d162bc334e", }, [Chains.avalanche]: { - portal: "0x74e121a34a66d54c33f3291f2cdf26b1cd037c3a" + portal: "0x74e121a34a66d54c33f3291f2cdf26b1cd037c3a", }, [Chains.moonbeam]: { - portal: "0x6372aec6263aa93eacedc994d38aa9117b6b95b5" + portal: "0x6372aec6263aa93eacedc994d38aa9117b6b95b5", }, [Chains.moonriver]: { - portal: "0xde1ae3c465354f01189150f3836c7c15a1d6671d" + portal: "0xde1ae3c465354f01189150f3836c7c15a1d6671d", }, [Chains.functionX]: { - portal: "0xdf935552fac687123c642f589296762b632a9aaf" + portal: "0xdf935552fac687123c642f589296762b632a9aaf", }, [Chains.telos]: { - portal: "0x201e5de97dfc46aace142b2009332c524c9d8d82" + portal: "0x201e5de97dfc46aace142b2009332c524c9d8d82", }, [Chains.polygon]: { - portal: "0x2216072a246a84f7b9ce0f1415dd239c9bf201ab" + portal: "0x2216072a246a84f7b9ce0f1415dd239c9bf201ab", }, [Chains.okexchain]: { - portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613" + portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613", }, [Chains.optimism]: { - portal: "0xc6ae1db6c66d909f7bfeeeb24f9adb8620bf9dbf" + portal: "0xc6ae1db6c66d909f7bfeeeb24f9adb8620bf9dbf", }, [Chains.xdc]: { - portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613" + portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613", }, [Chains.bsc]: { - portal: "0xc3711bdbe7e3063bf6c22e7fed42f782ac82baee" + portal: "0xc3711bdbe7e3063bf6c22e7fed42f782ac82baee", }, [Chains.astar]: { - portal: "0x592de30bebff484b5a43a6e8e3ec1a814902e0b6" + portal: "0x592de30bebff484b5a43a6e8e3ec1a814902e0b6", }, [Chains.metis]: { - portal: "0xc6ae1db6c66d909f7bfeeeb24f9adb8620bf9dbf" + portal: "0xc6ae1db6c66d909f7bfeeeb24f9adb8620bf9dbf", }, [Chains.horizen]: { - portal: "0x97e0883493e8bb7a119a1e36e53ee9e7a2d3ca7b" + portal: "0x97e0883493e8bb7a119a1e36e53ee9e7a2d3ca7b", }, [Chains.fantom]: { - portal: "0xccffe9d337f3c1b16bd271d109e691246fd69ee3" + portal: "0xccffe9d337f3c1b16bd271d109e691246fd69ee3", }, [Chains.clover]: { - portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613" + portal: "0xf7ba155556e2cd4dfe3fe26e506a14d2f4b97613", }, [Chains.gather]: { - portal: "0xc6ae1db6c66d909f7bfeeeb24f9adb8620bf9dbf" + portal: "0xc6ae1db6c66d909f7bfeeeb24f9adb8620bf9dbf", }, [Chains.tron]: { - portal: "0xfe464ebd5bb5d95731f90aa7b9e39df920a61c97" + portal: "0xfe464ebd5bb5d95731f90aa7b9e39df920a61c97", }, [Chains.vinuchain]: { - portal: "0x72ccf64ee5e2c7629ee4eee3e6ad6990289178ae" + portal: "0x72ccf64ee5e2c7629ee4eee3e6ad6990289178ae", }, }; const userLockPortalEventParams: ContractEventParams = { target: "", topic: "UserLockLogger(bytes32,uint256,address,uint256,uint256, bytes)", - abi: ["event UserLockLogger(bytes32 indexed smgID, uint indexed tokenPairID, address indexed tokenAccount, uint value, uint serviceFee, bytes userAccount)"], + abi: [ + "event UserLockLogger(bytes32 indexed smgID, uint indexed tokenPairID, address indexed tokenAccount, uint value, uint serviceFee, bytes userAccount)", + ], logKeys: { blockNumber: "blockNumber", txHash: "transactionHash", @@ -111,7 +112,9 @@ const userLockPortalEventParams: ContractEventParams = { const smgReleasePortalEventParams: ContractEventParams = { target: "", topic: "SmgReleaseLogger(bytes32,bytes32,uint256,uint256,address,address)", - abi: ["event SmgReleaseLogger(bytes32 indexed uniqueID, bytes32 indexed smgID, uint indexed tokenPairID, uint value, address tokenAccount, address userAccount)"], + abi: [ + "event SmgReleaseLogger(bytes32 indexed uniqueID, bytes32 indexed smgID, uint indexed tokenPairID, uint value, address tokenAccount, address userAccount)", + ], logKeys: { blockNumber: "blockNumber", txHash: "transactionHash", @@ -163,11 +166,11 @@ const adapter: BridgeAdapter = { metis: constructParams(Chains.metis), wan: constructParams(Chains.wanchain), - vinu: constructParams(Chains.vinuchain), - // functionx: constructParams(Chains.functionX), + vinuchain: constructParams(Chains.vinuchain), + functionx: constructParams(Chains.functionX), eon: constructParams(Chains.horizen), clv: constructParams(Chains.clover), - gth: constructParams(Chains.gather), + gather: constructParams(Chains.gather), // tron: constructParams(Chains.tron), }; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 9fd1c5ba..c17f82f9 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -612,9 +612,24 @@ export default [ "BSC", "Moonbeam", "Moonriver", + // "FunctionX", "Telos", + // "Okexchain", + // "Horizen", "Metis", "Astar", + "Vinuchain", + // "Tron", + // "Wanchain", + // "Clover", + "Gather", + "XDC", ], + chainMapping: { + avalanche: "avax", + vinuchain: "vinu", + // clover: "clv", + gather: "gth", + }, }, ] as BridgeNetwork[]; diff --git a/src/helpers/sui.ts b/src/helpers/sui.ts index 3b6776f4..5ca82f48 100644 --- a/src/helpers/sui.ts +++ b/src/helpers/sui.ts @@ -1,52 +1,52 @@ -import { - SuiClient, - SuiTransactionBlockResponse, - getFullnodeUrl, - PaginatedTransactionResponse, -} from "@mysten/sui.js/client"; +// import { +// SuiClient, +// SuiTransactionBlockResponse, +// getFullnodeUrl, +// PaginatedTransactionResponse, +// } from "@mysten/sui.js/client"; -export const getClient = () => { - const url = process.env.SUI_RPC ?? getFullnodeUrl("mainnet"); - return new SuiClient({ url }); -}; +// export const getClient = () => { +// const url = process.env.SUI_RPC ?? getFullnodeUrl("mainnet"); +// return new SuiClient({ url }); +// }; -export const getTransactionBlocks = async ( - fromCheckpoint: number, - toCheckpoint: number, - changedObject: string -): Promise => { - const client = getClient(); - const results: SuiTransactionBlockResponse[] = []; - let hasNextPage = false; - let cursor: string | null | undefined = undefined; - let oldestCheckpoint: string | null = null; - do { - // TODO: The public RPC doesn't support fetching events by chaining filters with a `TimeRange` filter, - // so we have to search backwards for our checkpoint range - const response: PaginatedTransactionResponse = await client.queryTransactionBlocks({ - filter: { ChangedObject: changedObject }, - cursor, - options: { - showEffects: true, - showEvents: true, - showInput: true, - showObjectChanges: true, - }, - }); - for (const txBlock of response.data) { - const checkpoint = txBlock.checkpoint; - if (!checkpoint) { - continue; - } - if (checkpoint >= fromCheckpoint.toString() && checkpoint <= toCheckpoint.toString()) { - results.push(txBlock); - } - if (oldestCheckpoint === null || checkpoint < oldestCheckpoint) { - oldestCheckpoint = checkpoint; - } - } - hasNextPage = response.hasNextPage; - cursor = response.nextCursor; - } while (hasNextPage && cursor && oldestCheckpoint && oldestCheckpoint >= fromCheckpoint.toString()); - return results; -}; +// export const getTransactionBlocks = async ( +// fromCheckpoint: number, +// toCheckpoint: number, +// changedObject: string +// ): Promise => { +// const client = getClient(); +// const results: SuiTransactionBlockResponse[] = []; +// let hasNextPage = false; +// let cursor: string | null | undefined = undefined; +// let oldestCheckpoint: string | null = null; +// do { +// // TODO: The public RPC doesn't support fetching events by chaining filters with a `TimeRange` filter, +// // so we have to search backwards for our checkpoint range +// const response: PaginatedTransactionResponse = await client.queryTransactionBlocks({ +// filter: { ChangedObject: changedObject }, +// cursor, +// options: { +// showEffects: true, +// showEvents: true, +// showInput: true, +// showObjectChanges: true, +// }, +// }); +// for (const txBlock of response.data) { +// const checkpoint = txBlock.checkpoint; +// if (!checkpoint) { +// continue; +// } +// if (checkpoint >= fromCheckpoint.toString() && checkpoint <= toCheckpoint.toString()) { +// results.push(txBlock); +// } +// if (oldestCheckpoint === null || checkpoint < oldestCheckpoint) { +// oldestCheckpoint = checkpoint; +// } +// } +// hasNextPage = response.hasNextPage; +// cursor = response.nextCursor; +// } while (hasNextPage && cursor && oldestCheckpoint && oldestCheckpoint >= fromCheckpoint.toString()); +// return results; +// }; diff --git a/src/utils/blocks.ts b/src/utils/blocks.ts index 936f72af..b9706f97 100644 --- a/src/utils/blocks.ts +++ b/src/utils/blocks.ts @@ -1,11 +1,11 @@ import { getLatestBlock as getLatestBlockSdk } from "@defillama/sdk/build/util"; -import { getClient } from "../helpers/sui"; +// import { getClient } from "../helpers/sui"; import { tronGetLatestBlock } from "../helpers/tron"; export async function getLatestBlockNumber(chain: string): Promise { if (chain === "sui") { - const client = getClient(); - return Number(await client.getLatestCheckpointSequenceNumber()); + // const client = getClient(); + // return Number(await client.getLatestCheckpointSequenceNumber()); } else if (chain === "tron") { return (await tronGetLatestBlock()).number; } @@ -14,10 +14,10 @@ export async function getLatestBlockNumber(chain: string): Promise { export async function getLatestBlock(chain: string): Promise<{ number: number; timestamp: number }> { if (chain === "sui") { - const client = getClient(); - const seqNumber = await client.getLatestCheckpointSequenceNumber(); - const { timestampMs } = await client.getCheckpoint({ id: seqNumber }); - return { number: Number(seqNumber), timestamp: Number(timestampMs) }; + // const client = getClient(); + // const seqNumber = await client.getLatestCheckpointSequenceNumber(); + // const { timestampMs } = await client.getCheckpoint({ id: seqNumber }); + // return { number: Number(seqNumber), timestamp: Number(timestampMs) }; } else if (chain === "tron") { return await tronGetLatestBlock(); } diff --git a/src/utils/provider.ts b/src/utils/provider.ts index 96cd2c77..f7519840 100644 --- a/src/utils/provider.ts +++ b/src/utils/provider.ts @@ -1,9 +1,9 @@ -import { getClient } from "../helpers/sui"; +// import { getClient } from "../helpers/sui"; import { getProvider as getLlamaProvider } from "@defillama/sdk"; export function getProvider(chain: string) { if (chain === "sui") { - return getClient(); + // return getClient(); } return getLlamaProvider(chain); diff --git a/tsconfig.json b/tsconfig.json index 6069e341..4b77ccd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ }, "compilerOptions": { "target": "es2019", - "skipLibCheck": false, + "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, From d288a606aba6b0d3c6929505e6581c3583cae969 Mon Sep 17 00:00:00 2001 From: vrtnd Date: Wed, 25 Oct 2023 20:33:10 +0300 Subject: [PATCH 14/28] fix --- src/adapters/portal/sui.ts | 320 ++++++++++++++++++------------------- 1 file changed, 160 insertions(+), 160 deletions(-) diff --git a/src/adapters/portal/sui.ts b/src/adapters/portal/sui.ts index bab94e64..9876636a 100644 --- a/src/adapters/portal/sui.ts +++ b/src/adapters/portal/sui.ts @@ -1,167 +1,167 @@ -import { ethers } from "ethers"; -import { getClient, getTransactionBlocks } from "../../helpers/sui"; -import { EventData } from "../../utils/types"; -import { SuiEvent, SuiObjectChange } from "@mysten/sui.js/dist/cjs/client"; -import { normalizeSuiAddress, SUI_TYPE_ARG } from "@mysten/sui.js/utils"; +// import { ethers } from "ethers"; +// import { getClient, getTransactionBlocks } from "../../helpers/sui"; +// import { EventData } from "../../utils/types"; +// import { SuiEvent, SuiObjectChange } from "@mysten/sui.js/dist/cjs/client"; +// import { normalizeSuiAddress, SUI_TYPE_ARG } from "@mysten/sui.js/utils"; -const wormholeMessageEventType = - "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a::publish_message::WormholeMessage"; -const tokenBridgeAddress = "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9"; -const originalTokenBridgePackageId = "0x26efee2b51c911237888e5dc6702868abca3c7ac12c53f76ef8eba0697695e3d"; +// const wormholeMessageEventType = +// "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a::publish_message::WormholeMessage"; +// const tokenBridgeAddress = "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9"; +// const originalTokenBridgePackageId = "0x26efee2b51c911237888e5dc6702868abca3c7ac12c53f76ef8eba0697695e3d"; -/** - * Retrieves Sui events from a given checkpoint range using the token bridge. - * Optimized to make as few RPC calls as possible. - * @param fromCheckpoint The starting checkpoint to retrieve events from. - * @param toCheckpoint The ending checkpoint to retrieve events from. - * @returns An array of EventData objects representing the events that occurred within the given checkpoint range. - */ -export const getSuiEvents = async (fromCheckpoint: number, toCheckpoint: number): Promise => { - const events: EventData[] = []; - const txBlocks = await getTransactionBlocks(fromCheckpoint, toCheckpoint, tokenBridgeAddress); - for (const txBlock of txBlocks) { - if ( - txBlock.effects?.status.status !== "success" || - !txBlock.checkpoint || - !txBlock.objectChanges || - txBlock.transaction?.data.transaction.kind !== "ProgrammableTransaction" - ) { - continue; - } - const transactions = txBlock.transaction.data.transaction.transactions; - for (const tx of transactions) { - const moveCall = "MoveCall" in tx && tx.MoveCall; - if (!moveCall || moveCall.package !== originalTokenBridgePackageId) { - continue; - } - if ( - (moveCall.module === "complete_transfer_with_payload" && moveCall.function === "authorize_transfer") || - (moveCall.module === "complete_transfer" && moveCall.function === "authorize_transfer") - ) { - const token = moveCall.type_arguments![0]; - // search backwards for the parse_and_verify call - const parseAndVerifyTx = transactions - .slice( - 0, - transactions.findIndex((value) => value === tx) - ) - .reverse() - .find( - (tx) => "MoveCall" in tx && tx.MoveCall.module === "vaa" && tx.MoveCall.function === "parse_and_verify" - ); - if (!parseAndVerifyTx || !("MoveCall" in parseAndVerifyTx)) { - continue; - } - const vaaArg = parseAndVerifyTx.MoveCall.arguments?.[1]; - if (!vaaArg || typeof vaaArg !== "object" || !("Input" in vaaArg)) { - continue; - } - const vaaInput = txBlock.transaction.data.transaction.inputs[vaaArg.Input]; - if (!vaaInput || vaaInput.type !== "pure" || vaaInput.valueType !== "vector") { - continue; - } - const vaa = Buffer.from(vaaInput.value as number[]); - const sigStart = 6; - const numSigners = vaa[5]; - const sigLength = 66; - const body = vaa.subarray(sigStart + sigLength * numSigners); - const payload = body.subarray(51); - const type = payload.readUInt8(0); - if (type !== 1 && type !== 3) { - continue; - } - const amount = await denormalizeAmount(token, ethers.BigNumber.from(payload.subarray(1, 33))); - const to = `0x${payload.subarray(67, 99).toString("hex")}`; - const event: EventData = { - blockNumber: Number(txBlock.checkpoint), - txHash: txBlock.digest, - // Wrapped tokens are minted from the zero address on Ethereum - // Override the from address to be the zero address for consistency - from: isWrappedToken(token, txBlock.objectChanges) ? ethers.constants.AddressZero : tokenBridgeAddress, - to, - token, - amount, - isDeposit: false, - }; - events.push(event); - } - if ( - ((moveCall.module === "transfer_tokens_with_payload" && moveCall.function === "transfer_tokens_with_payload") || - (moveCall.module === "transfer_tokens" && moveCall.function === "transfer_tokens")) && - txBlock.events - ) { - const token = tx.MoveCall.type_arguments![0]; - const payload = getWormholeMessagePayload(txBlock.events); - const originChain = payload.readUint16BE(65); - const toChain = payload.readUInt16BE(99); - const amount = await denormalizeAmount(token, ethers.BigNumber.from(payload.subarray(1, 33))); - const isWrapped = isWrappedToken(token, txBlock.objectChanges); - const event: EventData = { - blockNumber: Number(txBlock.checkpoint), - txHash: txBlock.digest, - from: txBlock.transaction.data.sender, - // if this is a wrapped token being burned and not being sent to its origin chain, - // then it should be included in the volume by fixing the to address - to: !isWrapped || originChain !== toChain ? tokenBridgeAddress : ethers.constants.AddressZero, - token, - amount, - isDeposit: !isWrapped, - }; - events.push(event); - } - } - } - return events; -}; +// /** +// * Retrieves Sui events from a given checkpoint range using the token bridge. +// * Optimized to make as few RPC calls as possible. +// * @param fromCheckpoint The starting checkpoint to retrieve events from. +// * @param toCheckpoint The ending checkpoint to retrieve events from. +// * @returns An array of EventData objects representing the events that occurred within the given checkpoint range. +// */ +// export const getSuiEvents = async (fromCheckpoint: number, toCheckpoint: number): Promise => { +// const events: EventData[] = []; +// const txBlocks = await getTransactionBlocks(fromCheckpoint, toCheckpoint, tokenBridgeAddress); +// for (const txBlock of txBlocks) { +// if ( +// txBlock.effects?.status.status !== "success" || +// !txBlock.checkpoint || +// !txBlock.objectChanges || +// txBlock.transaction?.data.transaction.kind !== "ProgrammableTransaction" +// ) { +// continue; +// } +// const transactions = txBlock.transaction.data.transaction.transactions; +// for (const tx of transactions) { +// const moveCall = "MoveCall" in tx && tx.MoveCall; +// if (!moveCall || moveCall.package !== originalTokenBridgePackageId) { +// continue; +// } +// if ( +// (moveCall.module === "complete_transfer_with_payload" && moveCall.function === "authorize_transfer") || +// (moveCall.module === "complete_transfer" && moveCall.function === "authorize_transfer") +// ) { +// const token = moveCall.type_arguments![0]; +// // search backwards for the parse_and_verify call +// const parseAndVerifyTx = transactions +// .slice( +// 0, +// transactions.findIndex((value) => value === tx) +// ) +// .reverse() +// .find( +// (tx) => "MoveCall" in tx && tx.MoveCall.module === "vaa" && tx.MoveCall.function === "parse_and_verify" +// ); +// if (!parseAndVerifyTx || !("MoveCall" in parseAndVerifyTx)) { +// continue; +// } +// const vaaArg = parseAndVerifyTx.MoveCall.arguments?.[1]; +// if (!vaaArg || typeof vaaArg !== "object" || !("Input" in vaaArg)) { +// continue; +// } +// const vaaInput = txBlock.transaction.data.transaction.inputs[vaaArg.Input]; +// if (!vaaInput || vaaInput.type !== "pure" || vaaInput.valueType !== "vector") { +// continue; +// } +// const vaa = Buffer.from(vaaInput.value as number[]); +// const sigStart = 6; +// const numSigners = vaa[5]; +// const sigLength = 66; +// const body = vaa.subarray(sigStart + sigLength * numSigners); +// const payload = body.subarray(51); +// const type = payload.readUInt8(0); +// if (type !== 1 && type !== 3) { +// continue; +// } +// const amount = await denormalizeAmount(token, ethers.BigNumber.from(payload.subarray(1, 33))); +// const to = `0x${payload.subarray(67, 99).toString("hex")}`; +// const event: EventData = { +// blockNumber: Number(txBlock.checkpoint), +// txHash: txBlock.digest, +// // Wrapped tokens are minted from the zero address on Ethereum +// // Override the from address to be the zero address for consistency +// from: isWrappedToken(token, txBlock.objectChanges) ? ethers.constants.AddressZero : tokenBridgeAddress, +// to, +// token, +// amount, +// isDeposit: false, +// }; +// events.push(event); +// } +// if ( +// ((moveCall.module === "transfer_tokens_with_payload" && moveCall.function === "transfer_tokens_with_payload") || +// (moveCall.module === "transfer_tokens" && moveCall.function === "transfer_tokens")) && +// txBlock.events +// ) { +// const token = tx.MoveCall.type_arguments![0]; +// const payload = getWormholeMessagePayload(txBlock.events); +// const originChain = payload.readUint16BE(65); +// const toChain = payload.readUInt16BE(99); +// const amount = await denormalizeAmount(token, ethers.BigNumber.from(payload.subarray(1, 33))); +// const isWrapped = isWrappedToken(token, txBlock.objectChanges); +// const event: EventData = { +// blockNumber: Number(txBlock.checkpoint), +// txHash: txBlock.digest, +// from: txBlock.transaction.data.sender, +// // if this is a wrapped token being burned and not being sent to its origin chain, +// // then it should be included in the volume by fixing the to address +// to: !isWrapped || originChain !== toChain ? tokenBridgeAddress : ethers.constants.AddressZero, +// token, +// amount, +// isDeposit: !isWrapped, +// }; +// events.push(event); +// } +// } +// } +// return events; +// }; -const getWormholeMessagePayload = (events: SuiEvent[]): Buffer => { - const filtered = events.filter((event) => { - return event.type === wormholeMessageEventType; - }); - // TODO: support multiple transfers in a single txBlock - if (filtered.length !== 1) { - throw new Error(`Expected exactly one wormhole message event, found ${filtered.length}`); - } - return Buffer.from((filtered[0].parsedJson as any).payload); -}; +// const getWormholeMessagePayload = (events: SuiEvent[]): Buffer => { +// const filtered = events.filter((event) => { +// return event.type === wormholeMessageEventType; +// }); +// // TODO: support multiple transfers in a single txBlock +// if (filtered.length !== 1) { +// throw new Error(`Expected exactly one wormhole message event, found ${filtered.length}`); +// } +// return Buffer.from((filtered[0].parsedJson as any).payload); +// }; -const tokenDecimalsCache: { [token: string]: number } = {}; +// const tokenDecimalsCache: { [token: string]: number } = {}; -const getTokenDecimals = async (token: string): Promise => { - if (token in tokenDecimalsCache) { - return tokenDecimalsCache[token]; - } - const client = getClient(); - const coinMetadata = await client.getCoinMetadata({ coinType: token }); - if (coinMetadata === null) { - throw new Error(`Failed to get coin metadata for ${token}`); - } - const { decimals } = coinMetadata; - tokenDecimalsCache[token] = decimals; - return decimals; -}; +// const getTokenDecimals = async (token: string): Promise => { +// if (token in tokenDecimalsCache) { +// return tokenDecimalsCache[token]; +// } +// const client = getClient(); +// const coinMetadata = await client.getCoinMetadata({ coinType: token }); +// if (coinMetadata === null) { +// throw new Error(`Failed to get coin metadata for ${token}`); +// } +// const { decimals } = coinMetadata; +// tokenDecimalsCache[token] = decimals; +// return decimals; +// }; -const denormalizeAmount = async (token: string, amount: ethers.BigNumber): Promise => { - const decimals = await getTokenDecimals(token); - if (decimals > 8) { - return amount.mul(ethers.BigNumber.from(10).pow(decimals - 8)); - } - return amount; -}; +// const denormalizeAmount = async (token: string, amount: ethers.BigNumber): Promise => { +// const decimals = await getTokenDecimals(token); +// if (decimals > 8) { +// return amount.mul(ethers.BigNumber.from(10).pow(decimals - 8)); +// } +// return amount; +// }; -const isWrappedToken = (token: string, objectChanges: SuiObjectChange[]) => { - const split = token.split("::"); - if (split.length !== 3) { - throw new Error(`Invalid token ${token}`); - } - const normalized = token === SUI_TYPE_ARG ? token : `${normalizeSuiAddress(split[0])}::${split[1]}::${split[2]}`; - const nativeKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::native_asset::NativeAsset<${normalized}>>`; - const wrappedKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::wrapped_asset::WrappedAsset<${normalized}>>`; - const value = objectChanges.find( - (change) => change.type === "mutated" && [nativeKey, wrappedKey].includes(change.objectType) - ); - if (!value) { - throw new Error(`Failed to find object change for token ${normalized}`); - } - return value.type === "mutated" && value.objectType === wrappedKey; -}; +// const isWrappedToken = (token: string, objectChanges: SuiObjectChange[]) => { +// const split = token.split("::"); +// if (split.length !== 3) { +// throw new Error(`Invalid token ${token}`); +// } +// const normalized = token === SUI_TYPE_ARG ? token : `${normalizeSuiAddress(split[0])}::${split[1]}::${split[2]}`; +// const nativeKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::native_asset::NativeAsset<${normalized}>>`; +// const wrappedKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::wrapped_asset::WrappedAsset<${normalized}>>`; +// const value = objectChanges.find( +// (change) => change.type === "mutated" && [nativeKey, wrappedKey].includes(change.objectType) +// ); +// if (!value) { +// throw new Error(`Failed to find object change for token ${normalized}`); +// } +// return value.type === "mutated" && value.objectType === wrappedKey; +// }; From 4464fe07bca788a02a2c8319f632ea38e07ec1d8 Mon Sep 17 00:00:00 2001 From: Stupid Boar Date: Thu, 26 Oct 2023 10:08:55 +0300 Subject: [PATCH 15/28] Resolve conflicts --- src/data/bridgeNetworkData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 3267867a..49cc9369 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -620,7 +620,7 @@ export default [ // }, // }, { - id: 41, + id: 42, displayName: "PepeTeam Bridge", bridgeDbName: "pepeteam_bridge", iconLink: "protocols:pepeteam-bridge", From 83f38f30a636779f84cacad2e23d6c338cab07c5 Mon Sep 17 00:00:00 2001 From: Stupid Boar Date: Thu, 26 Oct 2023 10:10:42 +0300 Subject: [PATCH 16/28] Resolve conflicts with master --- src/data/bridgeNetworkData.ts | 71 ++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 49cc9369..b011ef8c 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -585,40 +585,43 @@ export default [ "polygon zkevm": "polygon_zkevm", }, }, - // { - // id: 40, - // displayName: "WanBridge", - // bridgeDbName: "wanbridge", - // iconLink: "icons:wanbridge", - // largeTxThreshold: 10000, - // url: "https://bridge.wanchain.org", - // chains: [ - // "Ethereum", - // "Polygon", - // "Fantom", - // "Avalanche", - // "Arbitrum", - // "Optimism", - // "BSC", - // "Moonbeam", - // "Moonriver", - // "FunctionX", - // "Telos", - // "Okexchain", - // "Horizen", - // "Metis", - // "Astar", - // "Vinuchain", - // "Tron", - // "Wanchain", - // "Clover", - // "Gather", - // "XDC", - // ], - // chainMapping: { - // avalanche: "avax", - // }, - // }, + { + id: 41, + displayName: "WanBridge", + bridgeDbName: "wanbridge", + iconLink: "icons:wanbridge", + largeTxThreshold: 10000, + url: "https://bridge.wanchain.org", + chains: [ + "Ethereum", + "Polygon", + "Fantom", + "Avalanche", + "Arbitrum", + "Optimism", + "BSC", + "Moonbeam", + "Moonriver", + // "FunctionX", + "Telos", + // "Okexchain", + // "Horizen", + "Metis", + "Astar", + "Vinuchain", + // "Tron", + // "Wanchain", + // "Clover", + "Gather", + "XDC", + ], + chainMapping: { + avalanche: "avax", + vinuchain: "vinu", + // clover: "clv", + gather: "gth", + }, + }, { id: 42, displayName: "PepeTeam Bridge", From 348df58c82d1b8612e00c0968e84757a879f2364 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Fri, 27 Oct 2023 14:59:22 +0200 Subject: [PATCH 17/28] Add pnetwork --- src/adapters/index.ts | 2 ++ src/adapters/pnetwork/index.ts | 33 +++++++++++++++++++++++++++++++++ src/data/bridgeNetworkData.ts | 12 ++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 src/adapters/pnetwork/index.ts diff --git a/src/adapters/index.ts b/src/adapters/index.ts index a730ae62..b2960ff9 100644 --- a/src/adapters/index.ts +++ b/src/adapters/index.ts @@ -38,6 +38,7 @@ import manta from "./manta"; import squidrouter from "./squid"; import eywa from "./eywa"; import rhinofi from './rhinofi'; +import pnetwork from './pnetwork'; export default { polygon, @@ -78,6 +79,7 @@ export default { manta, eywa, rhinofi, + pnetwork, } as { [bridge: string]: BridgeAdapter; }; diff --git a/src/adapters/pnetwork/index.ts b/src/adapters/pnetwork/index.ts new file mode 100644 index 00000000..583a2eba --- /dev/null +++ b/src/adapters/pnetwork/index.ts @@ -0,0 +1,33 @@ +import { BridgeAdapter } from "../../helpers/bridgeAdapter.type"; +import { constructTransferParams } from "../../helpers/eventParams"; +import { getTxDataFromEVMEventLogs } from "../../helpers/processTransactions"; + +enum Chains { + ethereum = "ethereum", + bsc = "bsc", +} + +const vaultContractAddresses = { + [Chains.ethereum]: ["0xe396757ec7e6ac7c8e5abe7285dde47b98f22db8", "0x112334f50cb6efcff4e35ae51a022dbe41a48135"], + [Chains.bsc]: ["0x76c96b2b3cf96ee305c759a7cd985eaa67634dfc"], +}; + +const getPeginParams = (_vault: string) => constructTransferParams(_vault, true); + +const getPegoutParams = (_vault: string) => constructTransferParams(_vault, false); + +const getParamsForVault = (_vault: string) => [getPeginParams(_vault), getPegoutParams(_vault)]; + +const constructParams = (chain: Chains) => { + const vaults = vaultContractAddresses[chain]; + const eventParams = [...vaults.map(getParamsForVault).flat()]; + return async (fromBlock: number, toBlock: number) => + getTxDataFromEVMEventLogs("pnetwork", chain, fromBlock, toBlock, eventParams); +}; + +const adapter: BridgeAdapter = { + bsc: constructParams(Chains.bsc), + ethereum: constructParams(Chains.ethereum), +}; + +export default adapter; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index c17f82f9..63d11478 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -632,4 +632,16 @@ export default [ gather: "gth", }, }, + { + id: 42, + displayName: "pNetwork", + bridgeDbName: "pnetwork", + iconLink: "icons:pnetwork", + largeTxThreshold: 10000, + url: "https://p.network", + chains: [ + "Ethereum", + "BSC" + ] + }, ] as BridgeNetwork[]; From ee04df20b964f3f9a5f7671026b2a29a08b3789c Mon Sep 17 00:00:00 2001 From: vrtnd Date: Mon, 30 Oct 2023 18:23:54 +0300 Subject: [PATCH 18/28] Add pepe --- src/data/bridgeNetworkData.ts | 91 ++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index b011ef8c..cc1ef5e8 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -140,7 +140,7 @@ export default [ "Optimism", "Arbitrum", "Base", - "Sui" + "Sui", ], chainMapping: { avalanche: "avax", // this is needed temporarily, need to fix and remove @@ -578,58 +578,69 @@ export default [ iconLink: "icons:rhino.fi", largeTxThreshold: 10000, url: "", - chains: ["Arbitrum", "Arbitrum Nova", "BSC", "Polygon", "Optimism", "Base", "zkSync Era", "Polygon zkEVM", "Linea", "Scroll"], - chainMapping: { - "arbitrum nova": "arbitrum_nova", - "zksync era": "era", - "polygon zkevm": "polygon_zkevm", - }, - }, - { - id: 41, - displayName: "WanBridge", - bridgeDbName: "wanbridge", - iconLink: "icons:wanbridge", - largeTxThreshold: 10000, - url: "https://bridge.wanchain.org", chains: [ - "Ethereum", - "Polygon", - "Fantom", - "Avalanche", "Arbitrum", - "Optimism", + "Arbitrum Nova", "BSC", - "Moonbeam", - "Moonriver", - // "FunctionX", - "Telos", - // "Okexchain", - // "Horizen", - "Metis", - "Astar", - "Vinuchain", - // "Tron", - // "Wanchain", - // "Clover", - "Gather", - "XDC", + "Polygon", + "Optimism", + "Base", + "zkSync Era", + "Polygon zkEVM", + "Linea", + "Scroll", ], chainMapping: { - avalanche: "avax", - vinuchain: "vinu", - // clover: "clv", - gather: "gth", + "arbitrum nova": "arbitrum_nova", + "zksync era": "era", + "polygon zkevm": "polygon_zkevm", }, }, + // { + // id: 41, + // displayName: "WanBridge", + // bridgeDbName: "wanbridge", + // iconLink: "icons:wanbridge", + // largeTxThreshold: 10000, + // url: "https://bridge.wanchain.org", + // chains: [ + // "Ethereum", + // "Polygon", + // "Fantom", + // "Avalanche", + // "Arbitrum", + // "Optimism", + // "BSC", + // "Moonbeam", + // "Moonriver", + // // "FunctionX", + // "Telos", + // // "Okexchain", + // // "Horizen", + // "Metis", + // "Astar", + // "Vinuchain", + // // "Tron", + // // "Wanchain", + // // "Clover", + // "Gather", + // "XDC", + // ], + // chainMapping: { + // avalanche: "avax", + // vinuchain: "vinu", + // // clover: "clv", + // gather: "gth", + // }, + // }, { - id: 42, + id: 43, displayName: "PepeTeam Bridge", bridgeDbName: "pepeteam_bridge", iconLink: "protocols:pepeteam-bridge", largeTxThreshold: 10000, url: "https://bridge.pepe.team", chains: ["Ethereum", "BSC", "Polygon"], - destinationChain: "Waves", + destinationChain: "Waves", }, ] as BridgeNetwork[]; From c9e2752ff66d6763cf3c9a84cf5a752908012d31 Mon Sep 17 00:00:00 2001 From: Moses <103143573+Defi-Moses@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:47:53 +0000 Subject: [PATCH 19/28] Adding CCTP Contracts for synapse --- src/adapters/synapse/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/adapters/synapse/index.ts b/src/adapters/synapse/index.ts index a41bbc36..0baaa3e2 100644 --- a/src/adapters/synapse/index.ts +++ b/src/adapters/synapse/index.ts @@ -14,6 +14,7 @@ const contractAddresses = { }, avax: { synapseBridge: "0xC05e61d0E7a63D27546389B7aD62FdFf5A91aACE", + synapseCCTP: "0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84", }, boba: { synapseBridge: "0x432036208d2717394d2614d6697c46DF3Ed69540", @@ -64,6 +65,7 @@ const contractAddresses = { }, base: { synapseBridge: "0xf07d1C752fAb503E47FEF309bf14fbDD3E867089", + synapseCCTP:"0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84", } } as { [chain: string]: { From 08c2ae27bea5b750868cac7a9e5cc8d5f40f87e2 Mon Sep 17 00:00:00 2001 From: spiehdid Date: Wed, 8 Nov 2023 16:16:12 +0300 Subject: [PATCH 20/28] Fix type in deposit event --- src/adapters/eywa/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/eywa/index.ts b/src/adapters/eywa/index.ts index 2a1c6229..fc142374 100644 --- a/src/adapters/eywa/index.ts +++ b/src/adapters/eywa/index.ts @@ -44,7 +44,7 @@ const contractAddresses = { const depositPortalEventParams: ContractEventParams = { target: "", - topic: "Locked(address,uint256,uint256,address)", + topic: "Locked(address,uint256,address,address)", abi: ["event Locked(address token, uint256 amount, address from, address to)"], logKeys: { blockNumber: "blockNumber", From f004321c809fe821f349fa534325c2269602f77b Mon Sep 17 00:00:00 2001 From: bfloresio <111913416+bfloresio@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:53:37 -0500 Subject: [PATCH 21/28] Update index.ts kava Update index.ts with Kava chain. --- src/adapters/stargate/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/adapters/stargate/index.ts b/src/adapters/stargate/index.ts index 636184ca..8d0d4bf2 100644 --- a/src/adapters/stargate/index.ts +++ b/src/adapters/stargate/index.ts @@ -137,6 +137,13 @@ const contractAddresses = { ], nativeToken: "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", }, + kava: { + stg: "0x83c30eb8bc9ad7C56532895840039E62659896ea", + ercs: [ + "0xAad094F6A75A14417d39f04E690fC216f080A41a", // USDT + ], + }, + } as { [chain: string]: { stg?: string; @@ -435,6 +442,7 @@ const adapter: BridgeAdapter = { bsc: constructParams("bsc"), arbitrum: constructParams("arbitrum"), optimism: constructParams("optimism"), + kava: constructParams("kava"), // metis: constructParams("metis"), }; From 2a6436791b734d02f77f635b9f474e67a1cd544b Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Thu, 28 Sep 2023 09:20:28 -0500 Subject: [PATCH 22/28] Solana adapter support --- package.json | 1 + src/adapters/portal/README.md | 3 + src/adapters/portal/consts.ts | 61 ++++++++++++ src/adapters/portal/index.ts | 90 +++++------------ src/adapters/portal/tests.ts | 152 ++++++++++++++++++++++++++++- src/data/bridgeNetworkData.ts | 1 + src/helpers/processTransactions.ts | 2 +- src/helpers/solana.ts | 14 +++ src/utils/adapter.ts | 2 +- src/utils/blocks.ts | 12 +++ src/utils/constants.ts | 1 + src/utils/normalizeChain.ts | 2 + src/utils/provider.ts | 3 + 13 files changed, 278 insertions(+), 66 deletions(-) create mode 100644 src/adapters/portal/README.md create mode 100644 src/adapters/portal/consts.ts create mode 100644 src/helpers/solana.ts diff --git a/package.json b/package.json index 155f6e12..cbfeaaf9 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "dependencies": { "@defillama/sdk": "^4.0.64", + "@solana/web3.js": "^1.87.3", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", diff --git a/src/adapters/portal/README.md b/src/adapters/portal/README.md new file mode 100644 index 00000000..9a9bba27 --- /dev/null +++ b/src/adapters/portal/README.md @@ -0,0 +1,3 @@ +## Portal Bridge Adapter + +The Portal bridge adapter returns `EventData` for transactions involving token locking, unlocking, minting, or burning. In the case of burning and minting, the `to` and `from` addresses are set to the Ethereum zero-address to exclude wormhole-wrapped assets from the volume calculation. However, if a wormhole-wrapped asset is burned without being transferred to its origin chain, the `to` address is set to the token bridge address to include it in the volume calculation. This is consistent with DefiLlama's methodology of not double-counting transfers in the volume calculation. diff --git a/src/adapters/portal/consts.ts b/src/adapters/portal/consts.ts new file mode 100644 index 00000000..452154cf --- /dev/null +++ b/src/adapters/portal/consts.ts @@ -0,0 +1,61 @@ +// Wormhole: Portal core and token bridge contract addresses +// https://docs.wormhole.com/wormhole/blockchain-environments/environments +export const contractAddresses = { + ethereum: { + tokenBridge: "0x3ee18B2214AFF97000D974cf647E7C347E8fa585", + coreBridge: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B", + }, + polygon: { + tokenBridge: "0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE", + coreBridge: "0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7", + }, + fantom: { + tokenBridge: "0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2", + coreBridge: "0x126783A6Cb203a3E35344528B26ca3a0489a1485", + }, + avax: { + tokenBridge: "0x0e082F06FF657D94310cB8cE8B0D9a04541d8052", + coreBridge: "0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c", + }, + bsc: { + tokenBridge: "0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7", + coreBridge: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B", + }, + aurora: { + tokenBridge: "0x51b5123a7b0F9b2bA265f9c4C8de7D78D52f510F", + coreBridge: "0xa321448d90d4e5b0A732867c18eA198e75CAC48E", + }, + celo: { + tokenBridge: "0x796Dff6D74F3E27060B71255Fe517BFb23C93eed", + coreBridge: "0xa321448d90d4e5b0A732867c18eA198e75CAC48E", + }, + klaytn: { + tokenBridge: "0x5b08ac39EAED75c0439FC750d9FE7E1F9dD0193F", + coreBridge: "0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7", + }, + moonbeam: { + tokenBridge: "0xb1731c586ca89a23809861c6103f0b96b3f57d92", + coreBridge: "0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3", + }, + optimism: { + tokenBridge: "0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b", + coreBridge: "0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722", + }, + arbitrum: { + tokenBridge: "0x0b2402144Bb366A632D14B83F244D2e0e21bD39c", + coreBridge: "0xa5f208e072434bC67592E4C49C1B991BA79BCA46", + }, + base: { + tokenBridge: "0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627", + coreBridge: "0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6", + }, + solana: { + tokenBridge: "wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb", + coreBridge: "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth", + }, +} as { + [chain: string]: { + tokenBridge: string; + coreBridge: string; + }; +}; diff --git a/src/adapters/portal/index.ts b/src/adapters/portal/index.ts index 2cfc3e01..22a403a9 100644 --- a/src/adapters/portal/index.ts +++ b/src/adapters/portal/index.ts @@ -3,71 +3,11 @@ import { Chain } from "@defillama/sdk/build/general"; import { getTxDataFromEVMEventLogs } from "../../helpers/processTransactions"; import { getTxsBlockRangeEtherscan, getLock } from "../../helpers/etherscan"; import { EventData } from "../../utils/types"; -import { getProvider } from "@defillama/sdk/build/general"; import { ethers } from "ethers"; import { PromisePool } from "@supercharge/promise-pool"; - -// Wormhole: Portal core and token bridge contract addresses -// https://docs.wormhole.com/wormhole/blockchain-environments/environments -const contractAddresses = { - ethereum: { - tokenBridge: "0x3ee18B2214AFF97000D974cf647E7C347E8fa585", - coreBridge: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B", - }, - polygon: { - tokenBridge: "0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE", - coreBridge: "0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7", - }, - fantom: { - tokenBridge: "0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2", - coreBridge: "0x126783A6Cb203a3E35344528B26ca3a0489a1485", - }, - avax: { - tokenBridge: "0x0e082F06FF657D94310cB8cE8B0D9a04541d8052", - coreBridge: "0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c", - }, - bsc: { - tokenBridge: "0xB6F6D86a8f9879A9c87f643768d9efc38c1Da6E7", - coreBridge: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B", - }, - aurora: { - tokenBridge: "0x51b5123a7b0F9b2bA265f9c4C8de7D78D52f510F", - coreBridge: "0xa321448d90d4e5b0A732867c18eA198e75CAC48E", - }, - celo: { - tokenBridge: "0x796Dff6D74F3E27060B71255Fe517BFb23C93eed", - coreBridge: "0xa321448d90d4e5b0A732867c18eA198e75CAC48E", - }, - klaytn: { - tokenBridge: "0x5b08ac39EAED75c0439FC750d9FE7E1F9dD0193F", - coreBridge: "0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7", - }, - moonbeam: { - tokenBridge: "0xb1731c586ca89a23809861c6103f0b96b3f57d92", - coreBridge: "0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3", - }, - optimism: { - tokenBridge: "0x1D68124e65faFC907325e3EDbF8c4d84499DAa8b", - coreBridge: "0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722", - }, - arbitrum: { - tokenBridge: "0x0b2402144Bb366A632D14B83F244D2e0e21bD39c", - coreBridge: "0xa5f208e072434bC67592E4C49C1B991BA79BCA46", - }, - base: { - tokenBridge: "0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627", - coreBridge: "0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6", - }, - sui: { - tokenBridge: "0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9", // object ID - coreBridge: "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c", // object ID - }, -} as { - [chain: string]: { - tokenBridge: string; - coreBridge: string; - }; -}; +import { contractAddresses } from "./consts"; +import { getProvider } from "@defillama/sdk/build/general"; +import axios from "axios"; const completeTransferSigs = [ ethers.utils.id("completeTransferAndUnwrapETH(bytes)"), @@ -327,6 +267,29 @@ const constructParams = (chain: string) => { }; }; +interface SolanaEvent { + blockNumber: number; + txHash: string; + from: string; + to: string; + token: string; + amount: string; + isDeposit: boolean; +} + +const getSolanaEvents = async (fromSlot: number, toSlot: number): Promise => { + const response = await axios.get( + `https://europe-west3-wormhole-message-db-mainnet.cloudfunctions.net/get-solana-events?fromSlot=${fromSlot}&toSlot=${toSlot}` + ); + if (response.status !== 200) { + throw new Error(`Failed to fetch Solana events: ${response.statusText}`); + } + return response.data.map((event) => ({ + ...event, + amount: ethers.BigNumber.from(event.amount), + })); +}; + const adapter: BridgeAdapter = { ethereum: constructParams("ethereum"), polygon: constructParams("polygon"), @@ -340,6 +303,7 @@ const adapter: BridgeAdapter = { optimism: constructParams("optimism"), arbitrum: constructParams("arbitrum"), base: constructParams("base"), + solana: getSolanaEvents, }; export default adapter; diff --git a/src/adapters/portal/tests.ts b/src/adapters/portal/tests.ts index 407d0ade..06018f54 100644 --- a/src/adapters/portal/tests.ts +++ b/src/adapters/portal/tests.ts @@ -535,6 +535,155 @@ const testSui = async () => { console.log("sui tests passed"); }; +const sleep = async (ms: number) => await new Promise((resolve) => setTimeout(resolve, ms)); + +const testSolana = async () => { + // CompleteNative + // https://explorer.solana.com/tx/3pEZohiewvkQXxqTGiADrqJjQRJLz3twAtntsmktRSbHkUxXswCkM3XrKEzGaTNxF1jDeK6p726jVheRZJUmrJ1T + let blockNumber = 220570267; + let event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "3pEZohiewvkQXxqTGiADrqJjQRJLz3twAtntsmktRSbHkUxXswCkM3XrKEzGaTNxF1jDeK6p726jVheRZJUmrJ1T", + from: "2nQNF8F9LLWMqdjymiLK2u8HoHMvYa4orCXsp3w65fQ2", + to: "FyUckyjFpEmrG8LiCbQSdwaYYQEytE9VTt2rc4VoRzRK", + token: "So11111111111111111111111111111111111111112", + amount: ethers.BigNumber.from("100000"), + isDeposit: false, + }, + event + ); + // sleep so we don't get rate limited + sleep(5000); + + // CompleteWrapped + // https://explorer.solana.com/tx/8po9N198xBQUspS1jjgSw96ubNNwhEoCggXiutWcPRmshZUpfwcAoe3gFUzS57WiSfcDsFhaL63LhMZCw89Fymg + blockNumber = 220548178; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "8po9N198xBQUspS1jjgSw96ubNNwhEoCggXiutWcPRmshZUpfwcAoe3gFUzS57WiSfcDsFhaL63LhMZCw89Fymg", + from: ethers.constants.AddressZero, + to: "FYoCmjuGAWm9SmkCRfnCEigMP5TPidMrpLzoSgV6xBBa", + token: "A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM", + amount: ethers.BigNumber.from("50647953"), + isDeposit: false, + }, + event + ); + sleep(5000); + + // TransferWrapped - target chain != origin chain + // https://explorer.solana.com/tx/28TbBAgVVwTo6bGCUU6hS4bjCgNREAWMuax6B8nwCA4uT6L1CUhwT65bnMb2Eort7JMXQxGoGNNsK1H6eGQThces + blockNumber = 220563907; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "28TbBAgVVwTo6bGCUU6hS4bjCgNREAWMuax6B8nwCA4uT6L1CUhwT65bnMb2Eort7JMXQxGoGNNsK1H6eGQThces", + from: "8LS9m7c9SfPFdbnv6jHs5RYWXqzVkxLDcLJNG6j1ntUQ", + to: "wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb", + token: "A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM", + amount: ethers.BigNumber.from("2109000000"), + isDeposit: false, + }, + event + ); + sleep(5000); + + // TransferNative - WSOL + // https://explorer.solana.com/tx/61nqe3nxkJ3zCbRuKZ9xAtxb1Rbyc8uBWJbRPVigeUjA7A7dbfATdu4BanP9RniHNNqnUWj2JV6tVnQm28DArU27 (WSOL) + blockNumber = 219412303; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "61nqe3nxkJ3zCbRuKZ9xAtxb1Rbyc8uBWJbRPVigeUjA7A7dbfATdu4BanP9RniHNNqnUWj2JV6tVnQm28DArU27", + from: "7suUQ9d7jPLCXj9H8472APFbXphC59xoXGnf2AofD7bX", + to: "2nQNF8F9LLWMqdjymiLK2u8HoHMvYa4orCXsp3w65fQ2", + token: "So11111111111111111111111111111111111111112", + amount: ethers.BigNumber.from("100000000"), + isDeposit: true, + }, + event + ); + sleep(5000); + + // CompleteNativeWithPayload + // https://explorer.solana.com/tx/2i5UpmfW748CxHvYvW6udWwg68C4NhfqGQXNjB8JkwraHtXckP8Xst3AY55YPv4qdjEeKKxY67Gsw2tqM7jLZ9gT + blockNumber = 218544281; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "2i5UpmfW748CxHvYvW6udWwg68C4NhfqGQXNjB8JkwraHtXckP8Xst3AY55YPv4qdjEeKKxY67Gsw2tqM7jLZ9gT", + from: "2nQNF8F9LLWMqdjymiLK2u8HoHMvYa4orCXsp3w65fQ2", + to: "DrJjs6ziLYc9En8tq912mwdt5F5gRo9uRkWJRNEG9hDt", + token: "So11111111111111111111111111111111111111112", + amount: ethers.BigNumber.from("70000000"), + isDeposit: false, + }, + event + ); + sleep(5000); + + // CompleteWrappedWithPayload + // https://explorer.solana.com/tx/297Jkp5AJbSFFCw38VvSeYY9kGZLJvWrBsjvaS8kfPdLbqsDUbvdRs3TWjfJV9dwjiU7VA115oWrq2xcKwMTd8SV + blockNumber = 220139975; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "297Jkp5AJbSFFCw38VvSeYY9kGZLJvWrBsjvaS8kfPdLbqsDUbvdRs3TWjfJV9dwjiU7VA115oWrq2xcKwMTd8SV", + from: ethers.constants.AddressZero, + to: "Bqun5jc7m16uqVTtJf8sMzJ6qPRc3kjidBKGcUNfxAJy", + token: "G1vJEgzepqhnVu35BN4jrkv3wVwkujYWFFCxhbEZ1CZr", + amount: ethers.BigNumber.from("250000000"), + isDeposit: false, + }, + event + ); + sleep(5000); + + // TransferWrappedWithPayload + // https://explorer.solana.com/tx/2KMyCkFr2v6dxik8V7QR6ny1oJKY7bs2AZqTTXTpwV32aAhBCZC4i5nnXzHaRPaV25JC8BSwwv8t3QPsNUPbugde + blockNumber = 220549172; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "2KMyCkFr2v6dxik8V7QR6ny1oJKY7bs2AZqTTXTpwV32aAhBCZC4i5nnXzHaRPaV25JC8BSwwv8t3QPsNUPbugde", + from: "4RrFMkY3A5zWdizT61Px222qmSTJqnVszDeBZZNSoAH6", + to: ethers.constants.AddressZero, + token: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", + amount: ethers.BigNumber.from("77898286"), + isDeposit: false, + }, + event + ); + sleep(5000); + + // TransferNativeWithPayload + // https://explorer.solana.com/tx/2x1HP58teKmEYEZNTvQ9wnQEB3XLA8cD5phAqzuQKd6YHzdhkuMo16za6EQKsrB6a2G3s3QhxRh52qnhcFeT34xK + blockNumber = 219917822; + event = await getEvent(blockNumber, "solana"); + assertEqual( + { + blockNumber, + txHash: "2x1HP58teKmEYEZNTvQ9wnQEB3XLA8cD5phAqzuQKd6YHzdhkuMo16za6EQKsrB6a2G3s3QhxRh52qnhcFeT34xK", + from: "DrJjs6ziLYc9En8tq912mwdt5F5gRo9uRkWJRNEG9hDt", + to: "2nQNF8F9LLWMqdjymiLK2u8HoHMvYa4orCXsp3w65fQ2", + token: "So11111111111111111111111111111111111111112", + amount: ethers.BigNumber.from("58000000"), + isDeposit: true, + }, + event + ); + sleep(5000); +}; + (async () => { await Promise.all([ testNoEventsFound(), @@ -549,6 +698,7 @@ const testSui = async () => { testAvalanche(), testOptimism(), testKlaytn(), - testSui(), + // testSui(), + // testSolana(), ]); })(); diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index be27cfe2..d473347b 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -140,6 +140,7 @@ export default [ "Optimism", "Arbitrum", "Base", + "Solana" ], chainMapping: { avalanche: "avax", // this is needed temporarily, need to fix and remove diff --git a/src/helpers/processTransactions.ts b/src/helpers/processTransactions.ts index be6e5d7c..4b6a3b31 100644 --- a/src/helpers/processTransactions.ts +++ b/src/helpers/processTransactions.ts @@ -4,8 +4,8 @@ import { Chain } from "@defillama/sdk/build/general"; import { get } from "lodash"; import { ContractEventParams, PartialContractEventParams } from "../helpers/bridgeAdapter.type"; import { EventData } from "../utils/types"; -import { getProvider } from "@defillama/sdk/build/general"; import { PromisePool } from "@supercharge/promise-pool"; +import { getProvider } from "../utils/provider"; const EventKeyTypes = { blockNumber: "number", diff --git a/src/helpers/solana.ts b/src/helpers/solana.ts new file mode 100644 index 00000000..0efd90ec --- /dev/null +++ b/src/helpers/solana.ts @@ -0,0 +1,14 @@ +import { Connection } from "@solana/web3.js"; + +export const getConnection = (): Connection => { + const rpc = process.env["SOLANA_RPC"] ?? "https://api.mainnet-beta.solana.com"; + const connection = new Connection(rpc); + const getBlock = async (block: number) => { + return new Connection(rpc).getBlock(block, { + maxSupportedTransactionVersion: 0, + }) as any; + }; + + connection.getBlock = getBlock; + return connection; +}; diff --git a/src/utils/adapter.ts b/src/utils/adapter.ts index de764f79..5e721fe6 100644 --- a/src/utils/adapter.ts +++ b/src/utils/adapter.ts @@ -289,7 +289,7 @@ export const runAllAdaptersTimestampRange = async ( const chainContractsAreOn = bridgeNetwork.chainMapping?.[chain as Chain] ? bridgeNetwork.chainMapping?.[chain as Chain] : chain; - if (chainContractsAreOn === "tron" || chainContractsAreOn === "sui") { + if (chainContractsAreOn === "tron" || chainContractsAreOn === "sui" || chainContractsAreOn === "solana") { console.info(`Skipping running adapter ${bridgeDbName} on chain ${chainContractsAreOn}.`); return; } diff --git a/src/utils/blocks.ts b/src/utils/blocks.ts index b9706f97..202f8a32 100644 --- a/src/utils/blocks.ts +++ b/src/utils/blocks.ts @@ -1,11 +1,15 @@ import { getLatestBlock as getLatestBlockSdk } from "@defillama/sdk/build/util"; // import { getClient } from "../helpers/sui"; import { tronGetLatestBlock } from "../helpers/tron"; +import { getConnection } from "../helpers/solana"; export async function getLatestBlockNumber(chain: string): Promise { if (chain === "sui") { // const client = getClient(); // return Number(await client.getLatestCheckpointSequenceNumber()); + } else if (chain === "solana") { + const connection = getConnection(); + return await connection.getSlot(); } else if (chain === "tron") { return (await tronGetLatestBlock()).number; } @@ -20,6 +24,14 @@ export async function getLatestBlock(chain: string): Promise<{ number: number; t // return { number: Number(seqNumber), timestamp: Number(timestampMs) }; } else if (chain === "tron") { return await tronGetLatestBlock(); + } else if (chain === "solana") { + const connection = getConnection(); + let number = await connection.getSlot(); + let timestamp: number | null = null; + do { + timestamp = await connection.getBlockTime(number); + } while (timestamp === null); + return { number, timestamp }; } return await getLatestBlockSdk(chain); } diff --git a/src/utils/constants.ts b/src/utils/constants.ts index a154a1d0..09a195c4 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -18,6 +18,7 @@ export const maxBlocksToQueryByChain = { celo: 1200, klaytn: 6000, sui: 2400, // sui creates a checkpoint about every 3 seconds + solana: 18000, // solana produces slots every 400ms, so 2 hours is 18000 slots } as { [chain: string]: number }; export const nonBlocksChains = [ diff --git a/src/utils/normalizeChain.ts b/src/utils/normalizeChain.ts index 861d38df..3f40ea93 100644 --- a/src/utils/normalizeChain.ts +++ b/src/utils/normalizeChain.ts @@ -1124,6 +1124,8 @@ export function getChainDisplayName(normalizedChain: string, useNewChainNames: b return "zkSync Era"; case "sui": return "Sui"; + case "solana": + return "Solana"; default: return normalizedChain.slice(0, 1).toUpperCase() + normalizedChain.slice(1); // Capitalize first letter } diff --git a/src/utils/provider.ts b/src/utils/provider.ts index f7519840..c3859b13 100644 --- a/src/utils/provider.ts +++ b/src/utils/provider.ts @@ -1,9 +1,12 @@ // import { getClient } from "../helpers/sui"; import { getProvider as getLlamaProvider } from "@defillama/sdk"; +import { getConnection } from "../helpers/solana"; export function getProvider(chain: string) { if (chain === "sui") { // return getClient(); + } else if (chain === "solana") { + return getConnection(); } return getLlamaProvider(chain); From 2ff70d289b765f8f8d479fbdebc97ccd8eb723bd Mon Sep 17 00:00:00 2001 From: cryptolei Date: Fri, 17 Nov 2023 22:18:42 +0800 Subject: [PATCH 23/28] [feat] add debridge --- src/adapters/debridge/index.ts | 283 ++++++++------------------------- src/data/bridgeNetworkData.ts | 12 +- 2 files changed, 71 insertions(+), 224 deletions(-) diff --git a/src/adapters/debridge/index.ts b/src/adapters/debridge/index.ts index b1288ece..e85457c7 100644 --- a/src/adapters/debridge/index.ts +++ b/src/adapters/debridge/index.ts @@ -1,255 +1,108 @@ -import { BridgeAdapter, ContractEventParams, PartialContractEventParams } from "../../helpers/bridgeAdapter.type"; -import { Chain } from "@defillama/sdk/build/general"; +import { BridgeAdapter, PartialContractEventParams } from "../../helpers/bridgeAdapter.type"; import { getTxDataFromEVMEventLogs } from "../../helpers/processTransactions"; -import { constructTransferParams } from "../../helpers/eventParams"; -import { ethers } from "ethers"; -/* -Contracts: https://docs.debridge.finance/contracts/mainnet-addresses -Analytics: https://explorer.debridge.finance/analytics - -debridgeGate contract emits the following events, however, I had difficulty getting the token sent from them: -MonitoringSendEvent (bytes32 submissionId, uint256 nonce, uint256 lockedOrMintedAmount, uint256 totalSupply) -MonitoringClaimEvent (bytes32 submissionId, uint256 lockedOrMintedAmount, uint256 totalSupply) -Claimed (bytes32 submissionId, index_topic_1 bytes32 debridgeId, uint256 amount, index_topic_2 address receiver, uint256 nonce, index_topic_3 uint256 chainIdFrom, bytes autoParams, bool isNativeToken) - -For deposits/withdrawals (except native ETH), tokens are swapped to/from USDC or WETH and xfer'd to debridgeGate. -So it is possible to get all the txs and volume easily just looking at debridgeGate xfers (just need to filter out fee txs when doing so). -However, it's more difficult to get the initial/final token if using this approach: --can get it from input data for txs that are via deSwapSender --for txs that are via 0x6d7a3177f3500bea64914642a49d0b5c0a7dae6d (first, token is swapped through deSwapReceiver), - contract is not verified, so can't get input data, no simple way to get output token. -*/ - -const WETH = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"; - -const contractAddresses = { - ethereum: { - debridgeGate: "0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", - }, -} as { - [chain: string]: { - debridgeGate: string; - }; +/** + * deBridge is a messaging infrastructure. DLN is a cross-chain trading infrastructure + * DLN Contracts: https://docs.dln.trade/the-core-protocol/trusted-smart-contracts + * For all evm chains have same contract address + * - deposits via CreatedOrder event + * - withdraws via FulfilledOrder event + * + */ + +const evmContracts = { + dlnSource: "0xeF4fB24aD0916217251F553c0596F8Edc630EB66", + dlnDestination: "0xe7351fd770a37282b91d153ee690b63579d6dd7f", +} as const; + +const nativeTokenAddress = { + ethereum: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH + arbitrum: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", // WETH + avax: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7", // avax + polygon: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", // matic + fantom: "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83", // ftm + linea: "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", // WETH + optimism: "0x4200000000000000000000000000000000000006", // WETH + base: "0x4200000000000000000000000000000000000006", // WETH + bsc: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", // BNB }; -const testDepositParams: PartialContractEventParams = constructTransferParams( - "0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", - true -); -const testWithdrawalParams: PartialContractEventParams = constructTransferParams( - "0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", - false, - { excludeTo: ["0x6D7A3177f3500BEA64914642a49D0B5C0a7Dae6D"] } -); +type SupportedChains = keyof typeof nativeTokenAddress; -// routerCallNative -const routerCalldepositParams: ContractEventParams = { - target: null, - topic: "Transfer(address,address,uint256)", - logKeys: { - blockNumber: "blockNumber", - txHash: "transactionHash", - }, - argKeys: { - from: "from", - to: "to", - }, - txKeys: { - amount: "value", - }, - fixedEventData: { - token: WETH, - }, - abi: ["event Transfer(address indexed from, address indexed to, uint256 value)"], - topics: [ - ethers.utils.id("Transfer(address,address,uint256)"), - null, - ethers.utils.hexZeroPad("0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", 32), - ], - functionSignatureFilter: { - includeSignatures: ["0x060203"], - }, - isDeposit: true, -}; - -// swapAndSendV2 -const swapV2DepositParams: ContractEventParams = { - target: null, - topic: "Transfer(address,address,uint256)", - logKeys: { - blockNumber: "blockNumber", - txHash: "transactionHash", - }, - txKeys: { - from: "from", - to: "to", - }, - inputDataExtraction: { - inputDataABI: [ - "function swapAndSendV2(address _srcTokenIn, uint256 _srcAmountIn, bytes _srcTokenInPermit, address _srcSwapRouter, bytes _srcSwapCalldata, address _srcTokenOut, tuple(uint256 chainId, address receiver, bool useAssetFee, uint32 referralCode, bytes autoParams) _gateParams) payable", - ], - inputDataFnName: "swapAndSendV2", - inputDataKeys: { - token: "_srcTokenIn", - amount: "_srcAmountIn", - }, - }, - abi: ["event Transfer(address indexed from, address indexed to, uint256 value)"], - topics: [ - ethers.utils.id("Transfer(address,address,uint256)"), - null, - ethers.utils.hexZeroPad("0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", 32), +const depositPrarms: PartialContractEventParams = { + target: evmContracts.dlnSource, + topic: + "CreatedOrder((uint64,bytes,uint256,bytes,uint256,uint256,bytes,uint256,bytes,bytes,bytes,bytes,bytes,bytes),bytes32,bytes,uint256,uint256,uint32,bytes)", + abi: [ + "event CreatedOrder((uint64 makerOrderNonce, bytes makerSrc, uint256 giveChainId, bytes giveTokenAddress, uint256 giveAmount, uint256 takeChainId, bytes takeTokenAddress, uint256 takeAmount, bytes receiverDst, bytes givePatchAuthoritySrc, bytes orderAuthorityAddressDst, bytes allowedTakerDst, bytes allowedCancelBeneficiarySrc, bytes externalCall) order, bytes32 orderId, bytes affiliateFee, uint256 nativeFixFee, uint256 percentFee, uint32 referralCode, bytes metadata)", ], - functionSignatureFilter: { - includeSignatures: ["0x5dfd9b"], - }, - isDeposit: true, -}; - -// swapAndSendV3 -const swapV3DepositParams: ContractEventParams = { - target: null, - topic: "Transfer(address,address,uint256)", logKeys: { blockNumber: "blockNumber", txHash: "transactionHash", }, - txKeys: { - from: "from", - to: "to", - }, - inputDataExtraction: { - inputDataABI: [ - "function swapAndSendV3(address _srcTokenIn, uint256 _srcAmountIn, bytes _srcTokenInPermit, uint256 _affiliateFeeAmount, address _affiliateFeeRecipient, address _srcSwapRouter, bytes _srcSwapCalldata, address _srcTokenOut, tuple(uint256 chainId, address receiver, bool useAssetFee, uint32 referralCode, bytes autoParams) _gateParams) payable", - ], - inputDataFnName: "swapAndSendV3", - inputDataKeys: { - token: "_srcTokenIn", - amount: "_srcAmountIn", - }, - }, - abi: ["event Transfer(address indexed from, address indexed to, uint256 value)"], - topics: [ - ethers.utils.id("Transfer(address,address,uint256)"), - null, - ethers.utils.hexZeroPad("0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", 32), - ], - functionSignatureFilter: { - includeSignatures: ["0x5c5c57"], + argKeys: { + amount: "order.giveAmount", + to: "order.receiverDst", + from: "order.makerSrc", + token: "order.giveTokenAddress", }, isDeposit: true, }; -// sendV2 -const sendV2DepositParams: ContractEventParams = { - target: "0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", - topic: "MonitoringSendEvent(bytes32,uint256,uint256,uint256)", +const withdrawParams: PartialContractEventParams = { + target: evmContracts.dlnDestination, + topic: + "FulfilledOrder((uint64,bytes,uint256,bytes,uint256,uint256,bytes,uint256,bytes,bytes,bytes,bytes,bytes,bytes),bytes32,address,address)", abi: [ - "event MonitoringSendEvent(bytes32 submissionId, uint256 nonce, uint256 lockedOrMintedAmount, uint256 totalSupply)", + "event FulfilledOrder((uint64 makerOrderNonce, bytes makerSrc, uint256 giveChainId, bytes giveTokenAddress, uint256 giveAmount, uint256 takeChainId, bytes takeTokenAddress, uint256 takeAmount, bytes receiverDst, bytes givePatchAuthoritySrc, bytes orderAuthorityAddressDst, bytes allowedTakerDst, bytes allowedCancelBeneficiarySrc, bytes externalCall) order, bytes32 orderId, address sender, address unlockAuthority)", ], logKeys: { blockNumber: "blockNumber", txHash: "transactionHash", }, - txKeys: { - from: "from", - }, - inputDataExtraction: { - inputDataABI: [ - "function sendV2(address _srcTokenIn, uint256 _srcAmountIn, bytes _srcTokenInPermit, tuple(uint256 chainId, address receiver, bool useAssetFee, uint32 referralCode, bytes autoParams) _gateParams) payable", - ], - inputDataFnName: "sendV2", - inputDataKeys: { - token: "_srcTokenIn", - amount: "_srcAmountIn", - }, - }, - mapTokens: { - "0x0000000000000000000000000000000000000000": WETH, - }, - functionSignatureFilter: { - includeSignatures: ["0x1624ea"], - }, - fixedEventData: { - to: "0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", - }, - isDeposit: true, -}; - -// need to separate by fn and extract "token" and "to" from input data -// and should probably use swapWithdrawalParams, not this -const withdrawalParams: ContractEventParams = { - target: null, - topic: "Transfer(address,address,uint256)", - logKeys: { - blockNumber: "blockNumber", - txHash: "transactionHash", - token: "address", - }, argKeys: { - from: "from", - to: "to", - amount: "value", + amount: "order.takeAmount", + token: "order.takeTokenAddress", + to: "order.receiverDst", + from: "order.makerSrc", }, - abi: ["event Transfer(address indexed from, address indexed to, uint256 value)"], - topics: [ - ethers.utils.id("Transfer(address,address,uint256)"), - ethers.utils.hexZeroPad("0x43dE2d77BF8027e25dBD179B491e8d64f38398aA", 32), - ], - filter: { excludeTo: ["0x6D7A3177f3500BEA64914642a49D0B5C0a7Dae6D", "0x122fc7945dAd90144cba1f3f83cBeE912c0595D6"] }, + mapTokens: {}, isDeposit: false, }; -/* -const swapWithdrawalParams: ContractEventParams = { - target: "", - topic: "MonitoringClaimEvent(bytes32,uint256,uint256)", - abi: ["event MonitoringClaimEvent(bytes32 submissionId, uint256 lockedOrMintedAmount, uint256 totalSupply)"], - logKeys: { - blockNumber: "blockNumber", - txHash: "transactionHash", - }, - argKeys: { - amount: "lockedOrMintedAmount", - }, - fixedEventData: { - from: "", - }, - isDeposit: false, -}; -*/ +const constructParams = (chain: SupportedChains) => { + const eventParams: PartialContractEventParams[] = []; -const constructParams = (chain: string) => { - let eventParams = [] as any; - const chainAddresses = contractAddresses[chain]; - const debridgeGate = chainAddresses.debridgeGate; + const token = nativeTokenAddress[chain]; + + const finalDepositParams = { + ...depositPrarms, + mapTokens: { "0x0000000000000000000000000000000000000000": token }, + }; - /* - const finalSwapWithdrawalParams = { - ...swapWithdrawalParams, - target: debridgeGate, - fixedEventData: { - from: debridgeGate, - }, + const finalWithdrawParams = { + ...withdrawParams, + mapTokens: { "0x0000000000000000000000000000000000000000": token }, }; - */ - eventParams.push(withdrawalParams); + eventParams.push(finalDepositParams, finalWithdrawParams); return async (fromBlock: number, toBlock: number) => - getTxDataFromEVMEventLogs("debridge", chain as Chain, fromBlock, toBlock, eventParams); + getTxDataFromEVMEventLogs("debridge", chain, fromBlock, toBlock, eventParams); }; +// need add solana and heco + const adapter: BridgeAdapter = { ethereum: constructParams("ethereum"), - /* + bsc: constructParams("bsc"), polygon: constructParams("polygon"), - fantom: constructParams("fantom"), + arbitrum: constructParams("arbitrum"), avalanche: constructParams("avax"), - bsc: constructParams("bsc"), - aurora: constructParams("aurora"), - */ + fantom: constructParams("fantom"), + linea: constructParams("linea"), + optimism: constructParams("optimism"), + base: constructParams("base"), }; export default adapter; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index be27cfe2..cd9d0157 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -304,7 +304,7 @@ export default [ "zksync era": "era", }, }, - /* + { id: 20, displayName: "deBridge", @@ -312,18 +312,12 @@ export default [ iconLink: "icons:debridge", largeTxThreshold: 10000, url: "", - chains: [ - "Ethereum", - "Polygon", - "Arbitrum", - "Avalanche", - //BSC - ], + chains: ["Ethereum", "Polygon", "Arbitrum", "Avalanche", "BSC", "Fantom", "Optimism", "Linea", "Base"], chainMapping: { avalanche: "avax", // this is needed temporarily, need to fix and remove }, }, - */ + // { // id: 21, // displayName: "Optics", From 651146876d36f3438533964d04389d00ae6ab5e6 Mon Sep 17 00:00:00 2001 From: cryptolei Date: Wed, 22 Nov 2023 15:05:10 +0800 Subject: [PATCH 24/28] [update] change debridge to debridgedln --- src/adapters/{debridge => debridgedln}/index.ts | 8 ++++---- src/adapters/index.ts | 4 ++-- src/data/bridgeNetworkData.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) rename src/adapters/{debridge => debridgedln}/index.ts (93%) diff --git a/src/adapters/debridge/index.ts b/src/adapters/debridgedln/index.ts similarity index 93% rename from src/adapters/debridge/index.ts rename to src/adapters/debridgedln/index.ts index e85457c7..850bf42d 100644 --- a/src/adapters/debridge/index.ts +++ b/src/adapters/debridgedln/index.ts @@ -18,9 +18,9 @@ const evmContracts = { const nativeTokenAddress = { ethereum: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH arbitrum: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", // WETH - avax: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7", // avax - polygon: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", // matic - fantom: "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83", // ftm + avax: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7", // AVAX + polygon: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", // Matic + fantom: "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83", // FTM linea: "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", // WETH optimism: "0x4200000000000000000000000000000000000006", // WETH base: "0x4200000000000000000000000000000000000006", // WETH @@ -88,7 +88,7 @@ const constructParams = (chain: SupportedChains) => { eventParams.push(finalDepositParams, finalWithdrawParams); return async (fromBlock: number, toBlock: number) => - getTxDataFromEVMEventLogs("debridge", chain, fromBlock, toBlock, eventParams); + getTxDataFromEVMEventLogs("debridgedln", chain, fromBlock, toBlock, eventParams); }; // need add solana and heco diff --git a/src/adapters/index.ts b/src/adapters/index.ts index d03c37d9..ca70b4e3 100644 --- a/src/adapters/index.ts +++ b/src/adapters/index.ts @@ -18,7 +18,7 @@ import avalanchebtc from "./avalanche-btc"; import axelar from "./axelar"; import rainbowbridge from "./rainbowbridge"; import across from "./across"; -import debridge from "./debridge"; +import debridgedln from "./debridgedln"; import optics from "./optics"; import allbridge from "./allbridge"; import ibc from "./ibc"; @@ -61,7 +61,7 @@ export default { axelar, rainbowbridge, across, - debridge, + debridgedln, optics, allbridge, ibc, diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index cd9d0157..88c96773 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -307,9 +307,9 @@ export default [ { id: 20, - displayName: "deBridge", - bridgeDbName: "debridge", - iconLink: "icons:debridge", + displayName: "DLN (Powered by deBridge)", + bridgeDbName: "debridgedln", + iconLink: "icons:debridgedln", largeTxThreshold: 10000, url: "", chains: ["Ethereum", "Polygon", "Arbitrum", "Avalanche", "BSC", "Fantom", "Optimism", "Linea", "Base"], From ba77dd882536c1c2d7dd0ef512ee3c8ecf15d605 Mon Sep 17 00:00:00 2001 From: allush Date: Wed, 22 Nov 2023 10:40:09 +0000 Subject: [PATCH 25/28] symbiosis adds Manta chain support --- src/adapters/symbiosis/contracts.ts | 4 ++++ src/adapters/symbiosis/index.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/adapters/symbiosis/contracts.ts b/src/adapters/symbiosis/contracts.ts index bb409f70..c6fe3204 100644 --- a/src/adapters/symbiosis/contracts.ts +++ b/src/adapters/symbiosis/contracts.ts @@ -71,4 +71,8 @@ export const contracts = { portal: "0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4", synthesis: null, }, + manta: { + portal: "0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4", + synthesis: null, + }, } as const; \ No newline at end of file diff --git a/src/adapters/symbiosis/index.ts b/src/adapters/symbiosis/index.ts index 001d1814..d92dac62 100644 --- a/src/adapters/symbiosis/index.ts +++ b/src/adapters/symbiosis/index.ts @@ -52,8 +52,9 @@ const adapter: BridgeAdapter = { linea: constructParams("linea"), base: constructParams("base"), mantle: constructParams("mantle"), - tron: constructParams("tron"), + // tron: constructParams("tron"), scroll: constructParams("scroll"), + manta: constructParams("manta"), }; export default adapter; From 16595d24afaa94a54aafc5eb9090df4f1d4b422f Mon Sep 17 00:00:00 2001 From: vrotend Date: Fri, 24 Nov 2023 21:48:25 +0300 Subject: [PATCH 26/28] Update bridgeNetworkData.ts --- src/data/bridgeNetworkData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 88c96773..eb8a2a06 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -306,7 +306,7 @@ export default [ }, { - id: 20, + id: 43, displayName: "DLN (Powered by deBridge)", bridgeDbName: "debridgedln", iconLink: "icons:debridgedln", From f96f7066243e3ccdb87345cfe7ee4676df0e71bb Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Mon, 27 Nov 2023 15:54:11 +0000 Subject: [PATCH 27/28] update package-lock --- package-lock.json | 767 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 766 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 09aacba7..cdf1c380 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,12 @@ { - "name": "bridges_server", + "name": "bridges-server", "lockfileVersion": 2, "requires": true, "packages": { "": { "dependencies": { "@defillama/sdk": "^4.0.64", + "@solana/web3.js": "^1.87.3", "async-retry": "^1.3.1", "axios": "^0.21.0", "axios-rate-limit": "^1.3.0", @@ -1137,6 +1138,17 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/runtime": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.4.tgz", + "integrity": "sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.18.10", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", @@ -2706,6 +2718,28 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3503,6 +3537,142 @@ "node": ">=14.0.0" } }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/buffer-layout/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/@solana/buffer-layout/node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/@solana/web3.js": { + "version": "1.87.6", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.87.6.tgz", + "integrity": "sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.1", + "@solana/buffer-layout": "^4.0.0", + "agentkeepalive": "^4.3.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.6.12", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + } + }, + "node_modules/@solana/web3.js/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/@solana/web3.js/node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/@solana/web3.js/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -3568,6 +3738,14 @@ "@types/responselike": "*" } }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/eslint": { "version": "8.4.5", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", @@ -3651,6 +3829,14 @@ "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", "dev": true }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -3881,6 +4067,17 @@ "node": ">= 6.0.0" } }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, "node_modules/ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -4239,6 +4436,14 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -4272,6 +4477,18 @@ "node": "*" } }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/bignumber.js": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", @@ -4288,6 +4505,14 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -4331,6 +4556,16 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, "node_modules/bowser": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", @@ -4514,6 +4749,14 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, "node_modules/buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -4563,6 +4806,19 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "peer": true }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -5398,6 +5654,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -5626,6 +5893,19 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, "node_modules/es6-set": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", @@ -6203,6 +6483,11 @@ "es5-ext": "~0.10.14" } }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, "node_modules/events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", @@ -6387,6 +6672,14 @@ "url": "https://github.com/sponsors/jaydenseric" } }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -6424,6 +6717,11 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, "node_modules/fast-xml-parser": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", @@ -6535,6 +6833,11 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", @@ -7139,6 +7442,14 @@ "node": ">=12.20.0" } }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -7606,6 +7917,41 @@ "java-invoke-local": "lib/cli.js" } }, + "node_modules/jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/jayson/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -7752,6 +8098,11 @@ "dev": true, "peer": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "node_modules/json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -7775,6 +8126,14 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, "node_modules/jsonpath-plus": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.0.0.tgz", @@ -7793,6 +8152,21 @@ "node": "*" } }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -8436,6 +8810,17 @@ } } }, + "node_modules/node-gyp-build": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", + "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", @@ -9130,6 +9515,11 @@ "node": ">=8.10.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -9238,6 +9628,45 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rpc-websockets": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.8.0.tgz", + "integrity": "sha512-AStkq6KDvSAmA4WiwlK1pDvj/33BWmExTATUokC0v+NhWekXSTNzXS5OGXeYwq501/pj6lBZMofg/h4dx4/tCg==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "eventemitter3": "^4.0.7", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -9935,6 +10364,11 @@ "node": ">= 6" } }, + "node_modules/superstruct": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", + "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -10046,6 +10480,11 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "peer": true }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -10407,6 +10846,19 @@ "node": ">=0.4.x" } }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/util": { "version": "0.12.4", "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", @@ -11789,6 +12241,14 @@ "dev": true, "peer": true }, + "@babel/runtime": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.4.tgz", + "integrity": "sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, "@babel/template": { "version": "7.18.10", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", @@ -13034,6 +13494,19 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, + "@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "requires": { + "@noble/hashes": "1.3.2" + } + }, + "@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -13677,6 +14150,76 @@ "tslib": "^2.5.0" } }, + "@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "requires": { + "buffer": "~6.0.3" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + } + } + }, + "@solana/web3.js": { + "version": "1.87.6", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.87.6.tgz", + "integrity": "sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg==", + "requires": { + "@babel/runtime": "^7.23.2", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.1", + "@solana/buffer-layout": "^4.0.0", + "agentkeepalive": "^4.3.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.6.12", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + } + } + }, "@supercharge/promise-pool": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@supercharge/promise-pool/-/promise-pool-2.3.1.tgz", @@ -13736,6 +14279,14 @@ "@types/responselike": "*" } }, + "@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "requires": { + "@types/node": "*" + } + }, "@types/eslint": { "version": "8.4.5", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", @@ -13819,6 +14370,14 @@ "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", "dev": true }, + "@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "requires": { + "@types/node": "*" + } + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -14030,6 +14589,14 @@ "debug": "4" } }, + "agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "requires": { + "humanize-ms": "^1.2.1" + } + }, "ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -14310,6 +14877,14 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -14326,6 +14901,14 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, + "bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "requires": { + "bindings": "^1.3.0" + } + }, "bignumber.js": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", @@ -14336,6 +14919,14 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -14367,6 +14958,16 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "requires": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, "bowser": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", @@ -14485,6 +15086,14 @@ "update-browserslist-db": "^1.0.5" } }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "requires": { + "base-x": "^3.0.2" + } + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -14531,6 +15140,15 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "peer": true }, + "bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, "builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -15176,6 +15794,11 @@ "object-keys": "^1.1.1" } }, + "delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==" + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -15369,6 +15992,19 @@ "es6-symbol": "^3.1.1" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "requires": { + "es6-promise": "^4.0.3" + } + }, "es6-set": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", @@ -15804,6 +16440,11 @@ "es5-ext": "~0.10.14" } }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", @@ -15930,6 +16571,11 @@ "resolved": "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz", "integrity": "sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==" }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==" + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -15964,6 +16610,11 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, + "fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, "fast-xml-parser": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", @@ -16031,6 +16682,11 @@ "token-types": "^4.1.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", @@ -16460,6 +17116,14 @@ "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "requires": { + "ms": "^2.0.0" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -16772,6 +17436,37 @@ "integrity": "sha512-gZmQKe1QrfkkMjCn8Qv9cpyJFyogTYqkP5WCobX5RNaHsJzIV/6NvAnlnouOcwKr29QrxLGDGcqYuJ+ae98s1A==", "dev": true }, + "jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "requires": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "dependencies": { + "@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, "jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -16890,6 +17585,11 @@ "dev": true, "peer": true }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -16905,6 +17605,11 @@ "universalify": "^2.0.0" } }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==" + }, "jsonpath-plus": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.0.0.tgz", @@ -16917,6 +17622,15 @@ "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -17447,6 +18161,12 @@ "whatwg-url": "^5.0.0" } }, + "node-gyp-build": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", + "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", + "optional": true + }, "node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", @@ -17919,6 +18639,11 @@ "picomatch": "^2.2.1" } }, + "regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + }, "regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -17990,6 +18715,27 @@ "glob": "^7.1.3" } }, + "rpc-websockets": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.8.0.tgz", + "integrity": "sha512-AStkq6KDvSAmA4WiwlK1pDvj/33BWmExTATUokC0v+NhWekXSTNzXS5OGXeYwq501/pj6lBZMofg/h4dx4/tCg==", + "requires": { + "@babel/runtime": "^7.17.2", + "bufferutil": "^4.0.1", + "eventemitter3": "^4.0.7", + "utf-8-validate": "^5.0.2", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "dependencies": { + "ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "requires": {} + } + } + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -18504,6 +19250,11 @@ } } }, + "superstruct": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", + "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -18575,6 +19326,11 @@ "terser": "^5.7.2" } }, + "text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -18821,6 +19577,15 @@ } } }, + "utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, "util": { "version": "0.12.4", "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", From b726e7b79304ef2515a6c904f31caac576597c6e Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Mon, 27 Nov 2023 16:07:26 -0600 Subject: [PATCH 28/28] Add check for old blocks being pruned --- src/adapters/portal/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/adapters/portal/index.ts b/src/adapters/portal/index.ts index 22a403a9..d41e51b5 100644 --- a/src/adapters/portal/index.ts +++ b/src/adapters/portal/index.ts @@ -278,6 +278,10 @@ interface SolanaEvent { } const getSolanaEvents = async (fromSlot: number, toSlot: number): Promise => { + // Old blocks may have been pruned by the RPC + if (fromSlot < 233000000) { + return []; + } const response = await axios.get( `https://europe-west3-wormhole-message-db-mainnet.cloudfunctions.net/get-solana-events?fromSlot=${fromSlot}&toSlot=${toSlot}` );