From a8fb11d682bfe99232e4f3d9f71350818adc6ff0 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 22 Sep 2022 13:47:37 -0700
Subject: [PATCH 01/40] getWalletPublicKey returning an address
---
apps/web/package.json | 7 +
apps/web/src/components/LedgerWallet.vue | 96 ++++
apps/web/src/pages/index/index.vue | 4 +-
package-lock.json | 571 +++++++++++++++++++----
4 files changed, 583 insertions(+), 95 deletions(-)
create mode 100644 apps/web/src/components/LedgerWallet.vue
diff --git a/apps/web/package.json b/apps/web/package.json
index 72dbcd429..e854aaf6a 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -10,11 +10,15 @@
},
"dependencies": {
"@heroicons/vue": "^1.0.6",
+ "@ledgerhq/hw-app-btc": "^8.0.2",
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
+ "@ledgerhq/hw-transport-webusb": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"buffer": "^6.0.3",
+ "core-js": "^3.25.2",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
"vue": "^3.2.25",
@@ -32,5 +36,8 @@
"vite": "^2.9.9",
"vite-plugin-pages": "^0.23.0",
"vue-tsc": "^0.34.7"
+ },
+ "alias": {
+ "@ledgerhq/devices": "@ledgerhq/devices/lib-es"
}
}
diff --git a/apps/web/src/components/LedgerWallet.vue b/apps/web/src/components/LedgerWallet.vue
new file mode 100644
index 000000000..2333a4ec7
--- /dev/null
+++ b/apps/web/src/components/LedgerWallet.vue
@@ -0,0 +1,96 @@
+
+
+
+ Connect your Nano and open the Bitcoin app. Click button to start...
+
+
+
+ Your address:
+ {{ address }}
+
+
+
+
+
+
+
+
diff --git a/apps/web/src/pages/index/index.vue b/apps/web/src/pages/index/index.vue
index 3c6d182f8..81f470081 100644
--- a/apps/web/src/pages/index/index.vue
+++ b/apps/web/src/pages/index/index.vue
@@ -1,9 +1,11 @@
-
+
+
diff --git a/package-lock.json b/package-lock.json
index 2ed038f6a..d1df8fd63 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,11 +55,15 @@
"version": "0.0.1",
"dependencies": {
"@heroicons/vue": "^1.0.6",
+ "@ledgerhq/hw-app-btc": "^8.0.2",
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
+ "@ledgerhq/hw-transport-webusb": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"buffer": "^6.0.3",
+ "core-js": "^3.25.2",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
"vue": "^3.2.25",
@@ -5144,11 +5148,11 @@
}
},
"node_modules/@ledgerhq/devices": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.0.tgz",
- "integrity": "sha512-vq4B33WdU0dRAJIRFWZMj6w1W1yw1i4mekCmhk7N9wPaFrtGWZ2iI9WDihsNOBooCWKQe8Jsb9eD8RVThbSlFQ==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.1.tgz",
+ "integrity": "sha512-LlAyDU5+GH0w+J1wscLU+Ga4z5a5ACKmMGQKILj5XscCtp63NjbtVdVt4oc/xrmoUdRqVehIw2Ui+e9nIF52yA==",
"dependencies": {
- "@ledgerhq/errors": "^6.10.1",
+ "@ledgerhq/errors": "^6.10.2",
"@ledgerhq/logs": "^6.10.0",
"rxjs": "6",
"semver": "^7.3.5"
@@ -5201,9 +5205,58 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/@ledgerhq/errors": {
- "version": "6.10.1",
- "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.1.tgz",
- "integrity": "sha512-92d1zRQleR1AQ4CAXgWgDtKUms+8EwShLVUcajI+BLWvgJ1Vclmq6PsBIDEQbsm+riVu/Ji3LcHdmgFgmi0VGw=="
+ "version": "6.10.2",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.2.tgz",
+ "integrity": "sha512-iMfEJPWaan8QaZw87WMUnFFRJqveE3FpU2ObTE0ydTJLPJNOUJjjurGBklqdWM/j5BIQvpi3byGKFChfNg8CaQ=="
+ },
+ "node_modules/@ledgerhq/hw-app-btc": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-btc/-/hw-app-btc-8.0.2.tgz",
+ "integrity": "sha512-Bm6VTbNjLwyhJp4o4788OS+A8sRoBssaiQZmFsLpotfJK1mhGwNvDbDZ2WvrbsDhJus4p0mOeC8qcibezLnw3Q==",
+ "dependencies": {
+ "@ledgerhq/hw-transport": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0",
+ "bip32-path": "^0.4.2",
+ "bitcoinjs-lib": "^5.2.0",
+ "bs58": "^4.0.1",
+ "bs58check": "^2.1.2",
+ "invariant": "^2.2.4",
+ "ripemd160": "2",
+ "semver": "^7.3.5",
+ "sha.js": "2",
+ "tiny-secp256k1": "1.1.6",
+ "varuint-bitcoin": "1.1.2"
+ }
+ },
+ "node_modules/@ledgerhq/hw-app-btc/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@ledgerhq/hw-app-btc/node_modules/semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@ledgerhq/hw-app-btc/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/@ledgerhq/hw-app-eth": {
"version": "6.29.6",
@@ -5230,12 +5283,12 @@
}
},
"node_modules/@ledgerhq/hw-transport": {
- "version": "6.27.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.3.tgz",
- "integrity": "sha512-vQMNCC1DUDtS+nkJsbycgFMSodmj91WuGSxX7RjOz2vuZBc6jXtDn9jzYdsfyKOwnvalQAkXm9hWWHlrMIKdNQ==",
+ "version": "6.27.4",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.4.tgz",
+ "integrity": "sha512-i3RYKfSIZ7PHM2sFljAU443qOYMTlghx8l5AZqsNKsXbawHkuOr7EtISW3zqbC0Wh3uws7u63qQ/50TLmylr7g==",
"dependencies": {
- "@ledgerhq/devices": "^7.0.0",
- "@ledgerhq/errors": "^6.10.1",
+ "@ledgerhq/devices": "^7.0.1",
+ "@ledgerhq/errors": "^6.10.2",
"events": "^3.3.0"
}
},
@@ -5254,13 +5307,24 @@
"integrity": "sha512-hwoUwlC7le37kQ72W8hAzVq070zuY6IEpssYNXDTr3pEfc3cprTAgEnaBsb0jXQGiLdONPvxc7nPp8nSyGD3hQ=="
},
"node_modules/@ledgerhq/hw-transport-webhid": {
- "version": "6.27.2",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.2.tgz",
- "integrity": "sha512-ZlyNheUhcxBZqjJzhSfJfeGQvNbeyWs9866rdQjVeG1zsbTJi0+6tfRv8J248QISS8vHtG5IMSxgMg9mtux9dQ==",
+ "version": "6.27.4",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.4.tgz",
+ "integrity": "sha512-r30GAzaJkyCWnsdxyQKeYYSkzN3kiIBEVQiZ7MTMeVO2KRJFMDjO/2ZQ7AV6kjJWmENdfsHrlibSnxj933wB/A==",
"dependencies": {
- "@ledgerhq/devices": "^7.0.0",
- "@ledgerhq/errors": "^6.10.1",
- "@ledgerhq/hw-transport": "^6.27.2",
+ "@ledgerhq/devices": "^7.0.1",
+ "@ledgerhq/errors": "^6.10.2",
+ "@ledgerhq/hw-transport": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0"
+ }
+ },
+ "node_modules/@ledgerhq/hw-transport-webusb": {
+ "version": "6.27.4",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.4.tgz",
+ "integrity": "sha512-yth7Sba1YrR51qJ9clBT3qDGdVAy72eapSgN3kbnhas1oqJBmP+os9QukUhimuwthsEurIv78eP1UPtBU80ZOg==",
+ "dependencies": {
+ "@ledgerhq/devices": "^7.0.1",
+ "@ledgerhq/errors": "^6.10.2",
+ "@ledgerhq/hw-transport": "^6.27.4",
"@ledgerhq/logs": "^6.10.0"
}
},
@@ -8149,6 +8213,14 @@
"node": ">=0.10.0"
}
},
+ "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",
"funding": [
@@ -8217,6 +8289,87 @@
"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/bip174": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.0.tgz",
+ "integrity": "sha512-lkc0XyiX9E9KiVAS1ZiOqK1xfiwvf4FXDDdkDq5crcDzOq+xGytY+14qCsqz7kCiy8rpN1CRNfacRhf9G3JNSA==",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/bip32": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
+ "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
+ "dependencies": {
+ "@types/node": "10.12.18",
+ "bs58check": "^2.1.1",
+ "create-hash": "^1.2.0",
+ "create-hmac": "^1.1.7",
+ "tiny-secp256k1": "^1.1.3",
+ "typeforce": "^1.11.5",
+ "wif": "^2.0.6"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/bip32-path": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz",
+ "integrity": "sha512-ZBMCELjJfcNMkz5bDuJ1WrYvjlhEF5k6mQ8vUr4N7MbVRsXei7ZOg8VhhwMfNiW68NWmLkgkc6WvTickrLGprQ=="
+ },
+ "node_modules/bip32/node_modules/@types/node": {
+ "version": "10.12.18",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
+ "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
+ },
+ "node_modules/bip66": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
+ "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/bitcoin-ops": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
+ "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
+ },
+ "node_modules/bitcoinjs-lib": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz",
+ "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==",
+ "dependencies": {
+ "bech32": "^1.1.2",
+ "bip174": "^2.0.1",
+ "bip32": "^2.0.4",
+ "bip66": "^1.1.0",
+ "bitcoin-ops": "^1.4.0",
+ "bs58check": "^2.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.3",
+ "merkle-lib": "^2.0.10",
+ "pushdata-bitcoin": "^1.0.1",
+ "randombytes": "^2.0.1",
+ "tiny-secp256k1": "^1.1.1",
+ "typeforce": "^1.11.3",
+ "varuint-bitcoin": "^1.0.4",
+ "wif": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
"node_modules/blakejs": {
"version": "1.1.0",
"license": "CC0-1.0"
@@ -8435,6 +8588,14 @@
"node": ">= 6"
}
},
+ "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/bs58check": {
"version": "2.1.2",
"license": "MIT",
@@ -8444,20 +8605,6 @@
"safe-buffer": "^5.1.2"
}
},
- "node_modules/bs58check/node_modules/base-x": {
- "version": "3.0.9",
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/bs58check/node_modules/bs58": {
- "version": "4.0.1",
- "license": "MIT",
- "dependencies": {
- "base-x": "^3.0.2"
- }
- },
"node_modules/bser": {
"version": "2.1.1",
"dev": true,
@@ -10140,6 +10287,16 @@
"toggle-selection": "^1.0.6"
}
},
+ "node_modules/core-js": {
+ "version": "3.25.2",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.2.tgz",
+ "integrity": "sha512-YB4IAT1bjEfxTJ1XYy11hJAKskO+qmhuDBM8/guIfMz4JvdsAQAqvyb97zXX7JgSrfPLG5mRGFWJwJD39ruq2A==",
+ "hasInstallScript": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
"node_modules/core-js-pure": {
"version": "3.24.1",
"dev": true,
@@ -13025,6 +13182,11 @@
"node": "^10.12.0 || >=12.0.0"
}
},
+ "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/fill-range": {
"version": "7.0.1",
"dev": true,
@@ -14365,14 +14527,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/ganache-core/node_modules/base-x": {
- "version": "3.0.8",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- }
- },
"node_modules/ganache-core/node_modules/base/node_modules/define-property": {
"version": "1.0.0",
"dev": true,
@@ -14613,14 +14767,6 @@
"browserslist": "cli.js"
}
},
- "node_modules/ganache-core/node_modules/bs58": {
- "version": "4.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "base-x": "^3.0.2"
- }
- },
"node_modules/ganache-core/node_modules/bs58check": {
"version": "2.1.2",
"dev": true,
@@ -29018,6 +29164,11 @@
"node": ">= 8"
}
},
+ "node_modules/merkle-lib": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz",
+ "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA=="
+ },
"node_modules/merkle-patricia-tree": {
"version": "4.2.4",
"dev": true,
@@ -31716,6 +31867,14 @@
"node": ">=6"
}
},
+ "node_modules/pushdata-bitcoin": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz",
+ "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==",
+ "dependencies": {
+ "bitcoin-ops": "^1.3.0"
+ }
+ },
"node_modules/q": {
"version": "1.5.1",
"dev": true,
@@ -34954,6 +35113,27 @@
"node": ">=0.10.0"
}
},
+ "node_modules/tiny-secp256k1": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
+ "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "bindings": "^1.3.0",
+ "bn.js": "^4.11.8",
+ "create-hmac": "^1.1.7",
+ "elliptic": "^6.4.0",
+ "nan": "^2.13.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/tiny-secp256k1/node_modules/bn.js": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
+ },
"node_modules/tmp": {
"version": "0.0.33",
"dev": true,
@@ -36230,6 +36410,11 @@
"is-typedarray": "^1.0.0"
}
},
+ "node_modules/typeforce": {
+ "version": "1.18.0",
+ "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
+ "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
+ },
"node_modules/typescript": {
"version": "4.7.4",
"license": "Apache-2.0",
@@ -36654,6 +36839,14 @@
"spdx-expression-parse": "^3.0.0"
}
},
+ "node_modules/varuint-bitcoin": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
+ "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
+ "dependencies": {
+ "safe-buffer": "^5.1.1"
+ }
+ },
"node_modules/vary": {
"version": "1.1.2",
"license": "MIT",
@@ -37169,6 +37362,14 @@
"node": ">=4"
}
},
+ "node_modules/wif": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
+ "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
+ "dependencies": {
+ "bs58check": "<3.0.0"
+ }
+ },
"node_modules/window-size": {
"version": "1.1.1",
"dev": true,
@@ -41685,14 +41886,18 @@
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@heroicons/vue": "^1.0.6",
+ "@ledgerhq/hw-app-btc": "^8.0.2",
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
+ "@ledgerhq/hw-transport-webusb": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0",
"@rollup/plugin-inject": "^4.0.4",
"@vitejs/plugin-vue": "^2.3.3",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"autoprefixer": "^10.4.7",
"buffer": "^6.0.3",
+ "core-js": "^3.25.2",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
"postcss": "^8.4.14",
@@ -43436,11 +43641,11 @@
}
},
"@ledgerhq/devices": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.0.tgz",
- "integrity": "sha512-vq4B33WdU0dRAJIRFWZMj6w1W1yw1i4mekCmhk7N9wPaFrtGWZ2iI9WDihsNOBooCWKQe8Jsb9eD8RVThbSlFQ==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.1.tgz",
+ "integrity": "sha512-LlAyDU5+GH0w+J1wscLU+Ga4z5a5ACKmMGQKILj5XscCtp63NjbtVdVt4oc/xrmoUdRqVehIw2Ui+e9nIF52yA==",
"requires": {
- "@ledgerhq/errors": "^6.10.1",
+ "@ledgerhq/errors": "^6.10.2",
"@ledgerhq/logs": "^6.10.0",
"rxjs": "6",
"semver": "^7.3.5"
@@ -43483,9 +43688,51 @@
}
},
"@ledgerhq/errors": {
- "version": "6.10.1",
- "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.1.tgz",
- "integrity": "sha512-92d1zRQleR1AQ4CAXgWgDtKUms+8EwShLVUcajI+BLWvgJ1Vclmq6PsBIDEQbsm+riVu/Ji3LcHdmgFgmi0VGw=="
+ "version": "6.10.2",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.2.tgz",
+ "integrity": "sha512-iMfEJPWaan8QaZw87WMUnFFRJqveE3FpU2ObTE0ydTJLPJNOUJjjurGBklqdWM/j5BIQvpi3byGKFChfNg8CaQ=="
+ },
+ "@ledgerhq/hw-app-btc": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-btc/-/hw-app-btc-8.0.2.tgz",
+ "integrity": "sha512-Bm6VTbNjLwyhJp4o4788OS+A8sRoBssaiQZmFsLpotfJK1mhGwNvDbDZ2WvrbsDhJus4p0mOeC8qcibezLnw3Q==",
+ "requires": {
+ "@ledgerhq/hw-transport": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0",
+ "bip32-path": "^0.4.2",
+ "bitcoinjs-lib": "^5.2.0",
+ "bs58": "^4.0.1",
+ "bs58check": "^2.1.2",
+ "invariant": "^2.2.4",
+ "ripemd160": "2",
+ "semver": "^7.3.5",
+ "sha.js": "2",
+ "tiny-secp256k1": "1.1.6",
+ "varuint-bitcoin": "1.1.2"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ }
+ }
},
"@ledgerhq/hw-app-eth": {
"version": "6.29.6",
@@ -43511,12 +43758,12 @@
}
},
"@ledgerhq/hw-transport": {
- "version": "6.27.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.3.tgz",
- "integrity": "sha512-vQMNCC1DUDtS+nkJsbycgFMSodmj91WuGSxX7RjOz2vuZBc6jXtDn9jzYdsfyKOwnvalQAkXm9hWWHlrMIKdNQ==",
+ "version": "6.27.4",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.4.tgz",
+ "integrity": "sha512-i3RYKfSIZ7PHM2sFljAU443qOYMTlghx8l5AZqsNKsXbawHkuOr7EtISW3zqbC0Wh3uws7u63qQ/50TLmylr7g==",
"requires": {
- "@ledgerhq/devices": "^7.0.0",
- "@ledgerhq/errors": "^6.10.1",
+ "@ledgerhq/devices": "^7.0.1",
+ "@ledgerhq/errors": "^6.10.2",
"events": "^3.3.0"
}
},
@@ -43537,13 +43784,24 @@
}
},
"@ledgerhq/hw-transport-webhid": {
- "version": "6.27.2",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.2.tgz",
- "integrity": "sha512-ZlyNheUhcxBZqjJzhSfJfeGQvNbeyWs9866rdQjVeG1zsbTJi0+6tfRv8J248QISS8vHtG5IMSxgMg9mtux9dQ==",
+ "version": "6.27.4",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.4.tgz",
+ "integrity": "sha512-r30GAzaJkyCWnsdxyQKeYYSkzN3kiIBEVQiZ7MTMeVO2KRJFMDjO/2ZQ7AV6kjJWmENdfsHrlibSnxj933wB/A==",
"requires": {
- "@ledgerhq/devices": "^7.0.0",
- "@ledgerhq/errors": "^6.10.1",
- "@ledgerhq/hw-transport": "^6.27.2",
+ "@ledgerhq/devices": "^7.0.1",
+ "@ledgerhq/errors": "^6.10.2",
+ "@ledgerhq/hw-transport": "^6.27.4",
+ "@ledgerhq/logs": "^6.10.0"
+ }
+ },
+ "@ledgerhq/hw-transport-webusb": {
+ "version": "6.27.4",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.4.tgz",
+ "integrity": "sha512-yth7Sba1YrR51qJ9clBT3qDGdVAy72eapSgN3kbnhas1oqJBmP+os9QukUhimuwthsEurIv78eP1UPtBU80ZOg==",
+ "requires": {
+ "@ledgerhq/devices": "^7.0.1",
+ "@ledgerhq/errors": "^6.10.2",
+ "@ledgerhq/hw-transport": "^6.27.4",
"@ledgerhq/logs": "^6.10.0"
}
},
@@ -45605,6 +45863,14 @@
"pascalcase": "^0.1.1"
}
},
+ "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"
},
@@ -45643,6 +45909,80 @@
"version": "2.2.0",
"dev": true
},
+ "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"
+ }
+ },
+ "bip174": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.0.tgz",
+ "integrity": "sha512-lkc0XyiX9E9KiVAS1ZiOqK1xfiwvf4FXDDdkDq5crcDzOq+xGytY+14qCsqz7kCiy8rpN1CRNfacRhf9G3JNSA=="
+ },
+ "bip32": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
+ "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
+ "requires": {
+ "@types/node": "10.12.18",
+ "bs58check": "^2.1.1",
+ "create-hash": "^1.2.0",
+ "create-hmac": "^1.1.7",
+ "tiny-secp256k1": "^1.1.3",
+ "typeforce": "^1.11.5",
+ "wif": "^2.0.6"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "10.12.18",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
+ "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
+ }
+ }
+ },
+ "bip32-path": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz",
+ "integrity": "sha512-ZBMCELjJfcNMkz5bDuJ1WrYvjlhEF5k6mQ8vUr4N7MbVRsXei7ZOg8VhhwMfNiW68NWmLkgkc6WvTickrLGprQ=="
+ },
+ "bip66": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
+ "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==",
+ "requires": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "bitcoin-ops": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
+ "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
+ },
+ "bitcoinjs-lib": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz",
+ "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==",
+ "requires": {
+ "bech32": "^1.1.2",
+ "bip174": "^2.0.1",
+ "bip32": "^2.0.4",
+ "bip66": "^1.1.0",
+ "bitcoin-ops": "^1.4.0",
+ "bs58check": "^2.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.3",
+ "merkle-lib": "^2.0.10",
+ "pushdata-bitcoin": "^1.0.1",
+ "randombytes": "^2.0.1",
+ "tiny-secp256k1": "^1.1.1",
+ "typeforce": "^1.11.3",
+ "varuint-bitcoin": "^1.0.4",
+ "wif": "^2.0.1"
+ }
+ },
"blakejs": {
"version": "1.1.0"
},
@@ -45793,26 +46133,20 @@
"fast-json-stable-stringify": "2.x"
}
},
+ "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"
+ }
+ },
"bs58check": {
"version": "2.1.2",
"requires": {
"bs58": "^4.0.0",
"create-hash": "^1.1.0",
"safe-buffer": "^5.1.2"
- },
- "dependencies": {
- "base-x": {
- "version": "3.0.9",
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "bs58": {
- "version": "4.0.1",
- "requires": {
- "base-x": "^3.0.2"
- }
- }
}
},
"bser": {
@@ -46935,6 +47269,11 @@
"toggle-selection": "^1.0.6"
}
},
+ "core-js": {
+ "version": "3.25.2",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.2.tgz",
+ "integrity": "sha512-YB4IAT1bjEfxTJ1XYy11hJAKskO+qmhuDBM8/guIfMz4JvdsAQAqvyb97zXX7JgSrfPLG5mRGFWJwJD39ruq2A=="
+ },
"core-js-pure": {
"version": "3.24.1",
"dev": true
@@ -48913,6 +49252,11 @@
"flat-cache": "^3.0.4"
}
},
+ "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=="
+ },
"fill-range": {
"version": "7.0.1",
"dev": true,
@@ -49959,13 +50303,6 @@
}
}
},
- "base-x": {
- "version": "3.0.8",
- "dev": true,
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
"base64-js": {
"version": "1.5.1",
"dev": true
@@ -50151,13 +50488,6 @@
"electron-to-chromium": "^1.3.47"
}
},
- "bs58": {
- "version": "4.0.1",
- "dev": true,
- "requires": {
- "base-x": "^3.0.2"
- }
- },
"bs58check": {
"version": "2.1.2",
"dev": true,
@@ -60413,6 +60743,11 @@
"version": "1.4.1",
"dev": true
},
+ "merkle-lib": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz",
+ "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA=="
+ },
"merkle-patricia-tree": {
"version": "4.2.4",
"dev": true,
@@ -62235,6 +62570,14 @@
"punycode": {
"version": "2.1.0"
},
+ "pushdata-bitcoin": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz",
+ "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==",
+ "requires": {
+ "bitcoin-ops": "^1.3.0"
+ }
+ },
"q": {
"version": "1.5.1",
"dev": true
@@ -64422,6 +64765,25 @@
"timed-out": {
"version": "4.0.1"
},
+ "tiny-secp256k1": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
+ "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
+ "requires": {
+ "bindings": "^1.3.0",
+ "bn.js": "^4.11.8",
+ "create-hmac": "^1.1.7",
+ "elliptic": "^6.4.0",
+ "nan": "^2.13.2"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
+ }
+ }
+ },
"tmp": {
"version": "0.0.33",
"dev": true,
@@ -65204,6 +65566,11 @@
"is-typedarray": "^1.0.0"
}
},
+ "typeforce": {
+ "version": "1.18.0",
+ "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
+ "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
+ },
"typescript": {
"version": "4.7.4"
},
@@ -65492,6 +65859,14 @@
"spdx-expression-parse": "^3.0.0"
}
},
+ "varuint-bitcoin": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
+ "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
+ "requires": {
+ "safe-buffer": "^5.1.1"
+ }
+ },
"vary": {
"version": "1.1.2"
},
@@ -65821,6 +66196,14 @@
}
}
},
+ "wif": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
+ "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
+ "requires": {
+ "bs58check": "<3.0.0"
+ }
+ },
"window-size": {
"version": "1.1.1",
"dev": true,
From de3cab9a141901456ce3782b4cee81bd1c1e1719 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 22 Sep 2022 14:05:57 -0700
Subject: [PATCH 02/40] Get ethereum address from ledger device
---
apps/web/src/components/LedgerWallet.vue | 38 ++++++++++++++++++++----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/apps/web/src/components/LedgerWallet.vue b/apps/web/src/components/LedgerWallet.vue
index 2333a4ec7..b4222977b 100644
--- a/apps/web/src/components/LedgerWallet.vue
+++ b/apps/web/src/components/LedgerWallet.vue
@@ -3,10 +3,15 @@
Connect your Nano and open the Bitcoin app. Click button to start...
-
+
Your address:
- {{ address }}
+ {{ btcAddress }}
+
+
+
+ Your address:
+ {{ ethAddress }}
@@ -19,12 +24,14 @@ import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
import { getWalletPublicKey } from '@ledgerhq/hw-app-btc/lib/getWalletPublicKey'
import { createTransaction } from '@ledgerhq/hw-app-btc/lib/createTransaction'
import { listen } from '@ledgerhq/logs'
+import Eth from '@ledgerhq/hw-app-eth'
// import Btc from '@ledgerhq/hw-app-btc'
// import TransportWebHID from "@ledgerhq/hw-transport-webhid";
-const address = ref('Not yet connected')
+const btcAddress = ref('Not yet connected')
+const ethAddress = ref('Not yet connected')
-async function connectLedger() {
+async function connectLedgerBtc() {
try {
listen((log) => console.log(log))
const transport = await TransportWebUSB.create()
@@ -35,7 +42,7 @@ async function connectLedger() {
format: 'legacy',
}
const { bitcoinAddress } = await getWalletPublicKey(transport, options)
- address.value = bitcoinAddress
+ btcAddress.value = bitcoinAddress
// TODO: Figure out why this is failing (this was how docs suggested to do it)
// When the Ledger device connected it is trying to display the bitcoin address
@@ -48,6 +55,27 @@ async function connectLedger() {
}
}
+async function connectLedgerEth() {
+ try {
+ listen((log) => console.log(log))
+ const transport = await TransportWebUSB.create()
+ const eth = new Eth(transport)
+
+ const path = "44'/60'/0'/0/0"
+ const boolDisplay = false
+ const boolChaincode = true
+
+ const { address, chainCode, publicKey } = await eth.getAddress(
+ path,
+ boolDisplay,
+ boolChaincode
+ )
+ ethAddress.value = address
+ } catch (e) {
+ console.log('error: ', e)
+ }
+}
+
async function createNewTransaction() {
const transport = await TransportWebUSB.create()
/** Example arguments for createTransaction
From e4b52f88da22341e55f870ebddcda86ce2b69ad4 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 23 Sep 2022 12:05:54 -0700
Subject: [PATCH 03/40] Stashing active changes (createEthTransaction) before
switching branch
---
apps/web/src/components/LedgerWallet.vue | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/apps/web/src/components/LedgerWallet.vue b/apps/web/src/components/LedgerWallet.vue
index b4222977b..82e6608f7 100644
--- a/apps/web/src/components/LedgerWallet.vue
+++ b/apps/web/src/components/LedgerWallet.vue
@@ -13,7 +13,8 @@
Your address:
{{ ethAddress }}
-
+
+
@@ -76,7 +77,7 @@ async function connectLedgerEth() {
}
}
-async function createNewTransaction() {
+async function createBtcTransaction() {
const transport = await TransportWebUSB.create()
/** Example arguments for createTransaction
* inputs: [ [tx1, 1] ],
@@ -99,6 +100,23 @@ async function createNewTransaction() {
// useTrustedInputForSegwit?: boolean;
// }
}
+
+async function createEthTransaction() {
+ const transport = await TransportWebUSB.create()
+ const eth = new Eth(transport)
+ const path = "44'/60'/0'/0/0"
+ const to = '0x0000000000000000000000000000000000000000'
+ const value = '0x00'
+ const data = '0x00'
+ const chainId = 1
+ /* Parameters of signTransaction
+ path: string,
+ rawTxHex: string,
+ resolution?: LedgerEthTransactionResolution | null
+ */
+ const response = await eth.signTransaction(path, to, value, data, chainId) // TODO: Replace with appropriate parameters
+ console.log('response', response)
+}
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index f0ab055a1..da18933c3 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -1,26 +1,27 @@
import SpeculosHttpTransport from '@casimir/hw-transport-speculos'
-import TransportWebHID from '@ledgerhq/hw-transport-webhid'
+import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
import Eth from '@ledgerhq/hw-app-eth'
export default function useLedger() {
+ const bip32Path = '44\'/60\'/0\'/0/0'
- const bip32Path = '44\'/60\'/0\'/0/0'
+ async function getLedgerEthSigner() {
+ const transport = await _getLedgerTransport()
+ return new Eth(transport)
+ }
- async function getLedgerEthSigner() {
- const transport = await _getLedgerTransport()
- return new Eth(transport)
+ async function _getLedgerTransport() {
+ if (import.meta.env.PUBLIC_SPECULOS_PORT) {
+ return await SpeculosHttpTransport.open(
+ `http://127.0.0.1:${import.meta.env.PUBLIC_SPECULOS_PORT}`
+ )
+ } else {
+ return await TransportWebUSB.create()
}
+ }
- async function _getLedgerTransport() {
- if (import.meta.env.PUBLIC_SPECULOS_PORT) {
- return await SpeculosHttpTransport.open(`http://127.0.0.1:${import.meta.env.PUBLIC_SPECULOS_PORT}`)
- } else {
- return await TransportWebHID.create()
- }
- }
-
- return {
- bip32Path,
- getLedgerEthSigner
- }
-}
\ No newline at end of file
+ return {
+ bip32Path,
+ getLedgerEthSigner,
+ }
+}
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index ae032aece..a13010677 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -21,7 +21,7 @@ const {
sendWalletConnectTransaction,
} = useWalletConnect()
-const amount = ref('0.01')
+const amount = ref('0.001')
const toAddress = ref('0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203')
// Test ethereum send to address : 0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
@@ -63,7 +63,7 @@ export default function useWallet() {
} else if (provider === 'Ledger') {
const ledgerEth = await getLedgerEthSigner()
const { address } = await ledgerEth.getAddress(bip32Path)
- console.log(address)
+ console.log('address :>> ', address)
setSelectedAccount(address)
} else {
throw new Error('No provider selected')
@@ -103,8 +103,54 @@ export default function useWallet() {
} else if (selectedProvider.value === 'IoPay') {
await sendIoPayTransaction(toAddress.value, amount.value)
} else if (selectedProvider.value === 'Ledger') {
+ // TODO: Offload this to a Ledger composable
+ // TODO: Replace according to selected testnet
+ const infuraProvider = new ethers.providers.JsonRpcProvider(
+ 'https://optimism-goerli.infura.io/v3/4e8acb4e58bb4cb9978ac4a22f3326a7'
+ )
+ const chainId = 5
+ const gasPrice = ethers.utils.parseUnits('1.0', 'gwei').toString()
+ const recipient = '0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203'
+ const gasLimit = 1000000
+ // TODO: Add this once we have a way to get the nonce from the ledger
+ // let nonce = await provider.getTransactionCount(selectedAccount.value, "latest");
+ const _eth = await getLedgerEthSigner()
+
+ const transaction = {
+ to: recipient,
+ gasPrice: '0x' + parseInt(gasPrice).toString(16),
+ gasLimit: ethers.utils.hexlify(gasLimit),
+ // nonce: nonce,
+ chainId: chainId,
+ data: '0x00',
+ value: ethers.utils.parseUnits(amount.value, 'ether')._hex,
+ }
+ const unsignedTransaction = ethers.utils
+ .serializeTransaction(transaction)
+ .substring(2)
+
+ // TODO: Add resolution as third argument in signature
+ // import ledgerService from '@ledgerhq/hw-app-eth/lib/services/ledger'
+ // const resolution = await ledgerService.resolveTransaction(transaction)
+ // console.log('resolution :>> ', resolution)
+ const signature = await _eth.signTransaction(
+ bip32Path,
+ unsignedTransaction
+ // resolution
+ )
+ signature.r = '0x' + signature.r
+ signature.s = '0x' + signature.s
+ signature.v = parseInt(signature.v)
+ signature.from = selectedAccount.value
+ const signedTransaction = ethers.utils.serializeTransaction(
+ transaction,
+ signature
+ )
+ const txHash = await infuraProvider.sendTransaction(signedTransaction)
+ console.log('txHash :>> ', txHash)
+
+ // TODO: Remove after testing with speculos
// npm run dev:ethereum in another process
- // const ledgerEth = await getLedgerEthSigner()
// Create - { to: ... }
// Serialize - ethers.utils.serializeTransaction
// Sign - ledgerEth.signTransaction
diff --git a/apps/web/src/pages/index/index.vue b/apps/web/src/pages/index/index.vue
index 81f470081..3c6d182f8 100644
--- a/apps/web/src/pages/index/index.vue
+++ b/apps/web/src/pages/index/index.vue
@@ -1,11 +1,9 @@
-
-
+
From cfd97144a8631fe4d9db7fa50cf44bdfef6ec059 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Sat, 1 Oct 2022 23:08:07 -0700
Subject: [PATCH 08/40] Stash changes
---
apps/web/src/composables/wallet.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index a09495ce8..7b7250618 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -137,6 +137,11 @@ export default function useWallet() {
} else if (selectedProvider.value === 'IoPay') {
const hashedMessage = ethers.utils.id(message)
await signIoTexMessage(hashedMessage)
+ } else if (selectedProvider.value === 'Ledger') {
+ // TODO: Implement this (10/1/2022)
+ // Get signer
+ // Sign message
+ // Send to backend for verification
} else {
console.log('signMessage not yet supported for this wallet provider')
}
From a192dcb94798eb98d36d78e72aad6aed5883e1fb Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Sun, 2 Oct 2022 14:50:09 -0700
Subject: [PATCH 09/40] Move most of ledger code into its composable
---
apps/web/src/composables/ledger.ts | 35 +++++++++++++++++-
apps/web/src/composables/wallet.ts | 59 ++++++++++--------------------
2 files changed, 53 insertions(+), 41 deletions(-)
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index da18933c3..475c85792 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -1,9 +1,10 @@
import SpeculosHttpTransport from '@casimir/hw-transport-speculos'
import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
import Eth from '@ledgerhq/hw-app-eth'
+import { ethers } from 'ethers'
export default function useLedger() {
- const bip32Path = '44\'/60\'/0\'/0/0'
+ const bip32Path = "44'/60'/0'/0/0"
async function getLedgerEthSigner() {
const transport = await _getLedgerTransport()
@@ -20,8 +21,40 @@ export default function useLedger() {
}
}
+ async function sendLedgerTransaction(transaction: any) {
+ // TODO: Replace according to selected testnet
+ const infuraProvider = new ethers.providers.JsonRpcProvider(
+ 'https://goerli.infura.io/v3/4e8acb4e58bb4cb9978ac4a22f3326a7'
+ )
+ const _eth = await getLedgerEthSigner()
+ const unsignedTransaction = ethers.utils
+ .serializeTransaction(transaction)
+ .substring(2)
+
+ // TODO: Add resolution as third argument in signature
+ // import ledgerService from '@ledgerhq/hw-app-eth/lib/services/ledger'
+ // const resolution = await ledgerService.resolveTransaction(transaction)
+ // console.log('resolution :>> ', resolution)
+ const signature = await _eth.signTransaction(
+ bip32Path,
+ unsignedTransaction
+ // resolution
+ )
+ signature.r = '0x' + signature.r
+ signature.s = '0x' + signature.s
+ signature.v = parseInt(signature.v)
+ signature.from = transaction.value
+ const signedTransaction = ethers.utils.serializeTransaction(
+ transaction,
+ signature
+ )
+ const txHash = await infuraProvider.sendTransaction(signedTransaction)
+ console.log('txHash :>> ', txHash)
+ }
+
return {
bip32Path,
getLedgerEthSigner,
+ sendLedgerTransaction,
}
}
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index a13010677..a3f06950a 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -28,7 +28,7 @@ const toAddress = ref('0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203')
export default function useWallet() {
const { getIoPayAccounts, sendIoPayTransaction } = useIoPay()
- const { bip32Path, getLedgerEthSigner } = useLedger()
+ const { bip32Path, getLedgerEthSigner, sendLedgerTransaction } = useLedger()
const ethereum: any = window.ethereum
const availableProviders = ref(
getBrowserProviders(ethereum)
@@ -63,7 +63,6 @@ export default function useWallet() {
} else if (provider === 'Ledger') {
const ledgerEth = await getLedgerEthSigner()
const { address } = await ledgerEth.getAddress(bip32Path)
- console.log('address :>> ', address)
setSelectedAccount(address)
} else {
throw new Error('No provider selected')
@@ -103,53 +102,33 @@ export default function useWallet() {
} else if (selectedProvider.value === 'IoPay') {
await sendIoPayTransaction(toAddress.value, amount.value)
} else if (selectedProvider.value === 'Ledger') {
- // TODO: Offload this to a Ledger composable
- // TODO: Replace according to selected testnet
+ const chainId = 5 // TODO: Replace according to selected testnet
+
+ // TODO: Figure out how to set gasLimit and gasPrice for transaction
const infuraProvider = new ethers.providers.JsonRpcProvider(
- 'https://optimism-goerli.infura.io/v3/4e8acb4e58bb4cb9978ac4a22f3326a7'
+ 'https://goerli.infura.io/v3/4e8acb4e58bb4cb9978ac4a22f3326a7'
)
- const chainId = 5
- const gasPrice = ethers.utils.parseUnits('1.0', 'gwei').toString()
- const recipient = '0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203'
- const gasLimit = 1000000
+ const gasLimit = await infuraProvider.estimateGas({
+ to: toAddress.value,
+ value: ethers.utils.parseEther(amount.value),
+ })
+ const gasPrice = await infuraProvider.getGasPrice()
+
// TODO: Add this once we have a way to get the nonce from the ledger
// let nonce = await provider.getTransactionCount(selectedAccount.value, "latest");
- const _eth = await getLedgerEthSigner()
-
+ console.log('current address: ', selectedAccount.value)
const transaction = {
- to: recipient,
- gasPrice: '0x' + parseInt(gasPrice).toString(16),
- gasLimit: ethers.utils.hexlify(gasLimit),
+ to: toAddress.value,
+ gasPrice: gasPrice,
+ gasLimit: gasLimit,
+ // gasLimit: ethers.utils.hexlify(gasLimit),
// nonce: nonce,
chainId: chainId,
data: '0x00',
value: ethers.utils.parseUnits(amount.value, 'ether')._hex,
}
- const unsignedTransaction = ethers.utils
- .serializeTransaction(transaction)
- .substring(2)
-
- // TODO: Add resolution as third argument in signature
- // import ledgerService from '@ledgerhq/hw-app-eth/lib/services/ledger'
- // const resolution = await ledgerService.resolveTransaction(transaction)
- // console.log('resolution :>> ', resolution)
- const signature = await _eth.signTransaction(
- bip32Path,
- unsignedTransaction
- // resolution
- )
- signature.r = '0x' + signature.r
- signature.s = '0x' + signature.s
- signature.v = parseInt(signature.v)
- signature.from = selectedAccount.value
- const signedTransaction = ethers.utils.serializeTransaction(
- transaction,
- signature
- )
- const txHash = await infuraProvider.sendTransaction(signedTransaction)
- console.log('txHash :>> ', txHash)
-
- // TODO: Remove after testing with speculos
+ await sendLedgerTransaction(transaction)
+ // TODO: Remove after testing with speculos or on Goerli testnet
// npm run dev:ethereum in another process
// Create - { to: ... }
// Serialize - ethers.utils.serializeTransaction
@@ -159,7 +138,7 @@ export default function useWallet() {
throw new Error('Provider selected not yet supported')
}
} catch (error) {
- console.error(error)
+ console.error('sendTransaction error: ', error)
}
}
From 7fbafab12174c8e78dc4707e931628e521339305 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Sun, 2 Oct 2022 16:44:57 -0700
Subject: [PATCH 10/40] Sign message with ledger
---
apps/web/src/composables/ledger.ts | 48 +++++++++++++++++++-----------
apps/web/src/composables/wallet.ts | 8 ++---
2 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index f0ab055a1..1f4b47f7e 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -1,26 +1,40 @@
import SpeculosHttpTransport from '@casimir/hw-transport-speculos'
-import TransportWebHID from '@ledgerhq/hw-transport-webhid'
+// import TransportWebHID from '@ledgerhq/hw-transport-webhid'
+import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
import Eth from '@ledgerhq/hw-app-eth'
export default function useLedger() {
+ const bip32Path = "44'/60'/0'/0/0"
- const bip32Path = '44\'/60\'/0\'/0/0'
+ async function getLedgerEthSigner() {
+ const transport = await _getLedgerTransport()
+ return new Eth(transport)
+ }
- async function getLedgerEthSigner() {
- const transport = await _getLedgerTransport()
- return new Eth(transport)
+ async function _getLedgerTransport() {
+ if (import.meta.env.PUBLIC_SPECULOS_PORT) {
+ return await SpeculosHttpTransport.open(
+ `http://127.0.0.1:${import.meta.env.PUBLIC_SPECULOS_PORT}`
+ )
+ } else {
+ return await TransportWebUSB.create()
}
+ }
- async function _getLedgerTransport() {
- if (import.meta.env.PUBLIC_SPECULOS_PORT) {
- return await SpeculosHttpTransport.open(`http://127.0.0.1:${import.meta.env.PUBLIC_SPECULOS_PORT}`)
- } else {
- return await TransportWebHID.create()
- }
- }
+ async function signMessageWithLedger(message: string) {
+ const _eth = await getLedgerEthSigner()
+ const signature = await _eth.signPersonalMessage(
+ "44'/60'/0'/0/0",
+ Buffer.from(message).toString('hex')
+ )
+ const signedHash =
+ '0x' + signature.r + signature.s + signature.v.toString(16)
+ return signedHash
+ }
- return {
- bip32Path,
- getLedgerEthSigner
- }
-}
\ No newline at end of file
+ return {
+ bip32Path,
+ getLedgerEthSigner,
+ signMessageWithLedger,
+ }
+}
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index 7b7250618..407a11fa6 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -29,7 +29,7 @@ const toAddress = ref('0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203')
export default function useWallet() {
const { getIoPayAccounts, sendIoPayTransaction, signIoTexMessage } =
useIoPay()
- const { bip32Path, getLedgerEthSigner } = useLedger()
+ const { bip32Path, getLedgerEthSigner, signMessageWithLedger } = useLedger()
const ethereum: any = window.ethereum
const availableProviders = ref(
getBrowserProviders(ethereum)
@@ -138,10 +138,8 @@ export default function useWallet() {
const hashedMessage = ethers.utils.id(message)
await signIoTexMessage(hashedMessage)
} else if (selectedProvider.value === 'Ledger') {
- // TODO: Implement this (10/1/2022)
- // Get signer
- // Sign message
- // Send to backend for verification
+ const signedHash = await signMessageWithLedger(message)
+ // TODO: Send to backend for verification
} else {
console.log('signMessage not yet supported for this wallet provider')
}
From ab7372d8924da4196a07b58821dc9e9183b6c97e Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Mon, 3 Oct 2022 16:52:27 -0700
Subject: [PATCH 11/40] Resolve Shane's comments from PR (and add some notes)
---
apps/web/package.json | 6 -
apps/web/src/composables/iopay.ts | 4 +-
apps/web/src/composables/ledger.ts | 21 +-
apps/web/src/composables/wallet.ts | 4 +-
contracts/evm/hardhat.config.ts | 72 +++---
package-lock.json | 385 -----------------------------
scripts/ethereum/dev | 4 +-
scripts/local/dev | 10 +-
8 files changed, 72 insertions(+), 434 deletions(-)
diff --git a/apps/web/package.json b/apps/web/package.json
index e854aaf6a..b631e69f2 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -10,15 +10,12 @@
},
"dependencies": {
"@heroicons/vue": "^1.0.6",
- "@ledgerhq/hw-app-btc": "^8.0.2",
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
- "@ledgerhq/logs": "^6.10.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"buffer": "^6.0.3",
- "core-js": "^3.25.2",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
"vue": "^3.2.25",
@@ -36,8 +33,5 @@
"vite": "^2.9.9",
"vite-plugin-pages": "^0.23.0",
"vue-tsc": "^0.34.7"
- },
- "alias": {
- "@ledgerhq/devices": "@ledgerhq/devices/lib-es"
}
}
diff --git a/apps/web/src/composables/iopay.ts b/apps/web/src/composables/iopay.ts
index d4985ca63..2695c36ce 100644
--- a/apps/web/src/composables/iopay.ts
+++ b/apps/web/src/composables/iopay.ts
@@ -28,7 +28,7 @@ export default function useIoPay() {
}
}
- const signIoTexMessage = async (message: string) => {
+ const signIoPayMessage = async (message: string) => {
return await signer.signMessage(message)
}
@@ -53,7 +53,7 @@ export default function useIoPay() {
return {
getIoPayAccounts,
sendIoPayTransaction,
- signIoTexMessage,
+ signIoPayMessage,
// stakeIoPay,
}
}
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index 2bfd4612d..198a22443 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -21,10 +21,15 @@ export default function useLedger() {
}
}
- async function sendLedgerTransaction(transaction: any) {
- // TODO: Replace according to selected testnet
- const infuraProvider = new ethers.providers.JsonRpcProvider(
- 'https://goerli.infura.io/v3/4e8acb4e58bb4cb9978ac4a22f3326a7'
+ // look at ethers.utils.UnsignedTransaction to make sure that doesn't suffice for you
+ // @shanejonas - Is there a ethers.utils.UnsignedTransaction method? https://docs.ethers.io/v5/api/utils/transactions/#transactions--functions
+ // a type, see line below
+ // @cccccali can I get term access. stepping away for aminute but can go audio in a bit
+ async function sendLedgerTransaction(
+ transaction: ethers.utils.UnsignedTransaction
+ ) {
+ const provider = new ethers.providers.JsonRpcProvider(
+ import.meta.env.ETHEREUM_RPC || 'http://127.0.0.1:8545'
)
const _eth = await getLedgerEthSigner()
const unsignedTransaction = ethers.utils
@@ -42,20 +47,22 @@ export default function useLedger() {
)
signature.r = '0x' + signature.r
signature.s = '0x' + signature.s
+
+ // TODO: Fix types here
signature.v = parseInt(signature.v)
- signature.from = transaction.value
+ signature.from = transaction.value // @chris there's just no way
const signedTransaction = ethers.utils.serializeTransaction(
transaction,
signature
)
- const txHash = await infuraProvider.sendTransaction(signedTransaction)
+ const txHash = await provider.sendTransaction(signedTransaction)
console.log('txHash :>> ', txHash)
}
async function signMessageWithLedger(message: string) {
const _eth = await getLedgerEthSigner()
const signature = await _eth.signPersonalMessage(
- "44'/60'/0'/0/0",
+ bip32Path,
Buffer.from(message).toString('hex')
)
const signedHash =
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index b582f5a79..d57597235 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -27,7 +27,7 @@ const toAddress = ref('0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203')
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
export default function useWallet() {
- const { getIoPayAccounts, sendIoPayTransaction, signIoTexMessage } =
+ const { getIoPayAccounts, sendIoPayTransaction, signIoPayMessage } =
useIoPay()
const {
bip32Path,
@@ -166,7 +166,7 @@ export default function useWallet() {
console.log('signature: ', signature)
} else if (selectedProvider.value === 'IoPay') {
const hashedMessage = ethers.utils.id(message)
- await signIoTexMessage(hashedMessage)
+ await signIoPayMessage(hashedMessage)
} else if (selectedProvider.value === 'Ledger') {
const signedHash = await signMessageWithLedger(message)
// TODO: Send to backend for verification
diff --git a/contracts/evm/hardhat.config.ts b/contracts/evm/hardhat.config.ts
index fa972d09b..379ce0178 100644
--- a/contracts/evm/hardhat.config.ts
+++ b/contracts/evm/hardhat.config.ts
@@ -7,53 +7,67 @@ import '@nomiclabs/hardhat-ethers'
import { HardhatUserConfig } from 'hardhat/config'
// https://hardhat.org/guides/create-task.html
-task('accounts', 'Prints the list of accounts', async (taskArgs: any, hre: { ethers: { getSigners: () => any } }) => {
- const accounts = await hre.ethers.getSigners()
+task(
+ 'accounts',
+ 'Prints the list of accounts',
+ async (taskArgs: any, hre: { ethers: { getSigners: () => any } }) => {
+ const accounts = await hre.ethers.getSigners()
- for (const account of accounts) {
- console.log(account.address)
+ for (const account of accounts) {
+ console.log(account.address)
+ }
}
-})
+)
// Use Ledger seed for consistency from localnet to testnet
-const defaultSeed = 'test test test test test test test test test test test junk'
+const defaultSeed =
+ 'test test test test test test test test test test test junk'
const mnemonic = process.env.LEDGER_SEED || defaultSeed
-console.log('Your mnemonic is', mnemonic)
+
+// Get fork RPC url if provided
+const forkUrl = process.env.FORK_URL
// Go to https://hardhat.org/config/ to learn more
const config: HardhatUserConfig = {
- solidity: '0.8.4',
+ solidity: '0.8.17',
paths: {
tests: './test',
sources: './src',
artifacts: './build/artifacts',
- cache: './build/cache'
+ cache: './build/cache',
},
typechain: {
- outDir: './build/artifacts/types'
+ outDir: './build/artifacts/types',
},
networks: {
hardhat: {
+ accounts: { mnemonic, accountsBalance: '32000000000000000000' },
chainId: 1337,
- accounts: { mnemonic, accountsBalance: '32000000000000000000' }
- }
- }
+ forking: forkUrl ? { url: forkUrl } : undefined,
+ },
+ },
}
-// Start a local tunnel for using RPC with https
-const localSubdomain = `cn-hh-${os.userInfo().username.toLowerCase()}`
-const localUrl = `https://${localSubdomain}.loca.lt`
-console.log('Your local tunnel is', localUrl)
-localtunnel({ port: 8545, subdomain: localSubdomain }).then((tunnel: localtunnel.Tunnel) => {
- if (localUrl === tunnel.url) {
- console.log('Your local tunnel is now available at', localUrl)
- } else {
- console.log('Your desired local tunnel url is not available')
- }
- process.on('SIGINT', () => {
- tunnel.close()
- process.exit(0)
- })
-})
+if (process.env.LOCAL_DEV) {
+ console.log('Your mnemonic is', mnemonic)
+
+ // Start a local tunnel for using RPC over https
+ const localSubdomain = `cn-hh-${os.userInfo().username.toLowerCase()}`
+ const localUrl = `https://${localSubdomain}.loca.lt`
+ console.log('Your local tunnel is', localUrl)
+ localtunnel({ port: 8545, subdomain: localSubdomain }).then(
+ (tunnel: localtunnel.Tunnel) => {
+ if (localUrl === tunnel.url) {
+ console.log('Your local tunnel is now available at', localUrl)
+ } else {
+ console.log('Your desired local tunnel url is not available')
+ }
+ process.on('SIGINT', () => {
+ tunnel.close()
+ process.exit(0)
+ })
+ }
+ )
+}
-export default config
\ No newline at end of file
+export default config
diff --git a/package-lock.json b/package-lock.json
index 6b5951e22..c38735518 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,15 +55,12 @@
"version": "0.0.1",
"dependencies": {
"@heroicons/vue": "^1.0.6",
- "@ledgerhq/hw-app-btc": "^8.0.2",
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
- "@ledgerhq/logs": "^6.10.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"buffer": "^6.0.3",
- "core-js": "^3.25.2",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
"vue": "^3.2.25",
@@ -5347,55 +5344,6 @@
"resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.2.tgz",
"integrity": "sha512-iMfEJPWaan8QaZw87WMUnFFRJqveE3FpU2ObTE0ydTJLPJNOUJjjurGBklqdWM/j5BIQvpi3byGKFChfNg8CaQ=="
},
- "node_modules/@ledgerhq/hw-app-btc": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-btc/-/hw-app-btc-8.0.2.tgz",
- "integrity": "sha512-Bm6VTbNjLwyhJp4o4788OS+A8sRoBssaiQZmFsLpotfJK1mhGwNvDbDZ2WvrbsDhJus4p0mOeC8qcibezLnw3Q==",
- "dependencies": {
- "@ledgerhq/hw-transport": "^6.27.4",
- "@ledgerhq/logs": "^6.10.0",
- "bip32-path": "^0.4.2",
- "bitcoinjs-lib": "^5.2.0",
- "bs58": "^4.0.1",
- "bs58check": "^2.1.2",
- "invariant": "^2.2.4",
- "ripemd160": "2",
- "semver": "^7.3.5",
- "sha.js": "2",
- "tiny-secp256k1": "1.1.6",
- "varuint-bitcoin": "1.1.2"
- }
- },
- "node_modules/@ledgerhq/hw-app-btc/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@ledgerhq/hw-app-btc/node_modules/semver": {
- "version": "7.3.7",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
- "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@ledgerhq/hw-app-btc/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
- },
"node_modules/@ledgerhq/hw-app-eth": {
"version": "6.29.6",
"resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-eth/-/hw-app-eth-6.29.6.tgz",
@@ -8427,87 +8375,6 @@
"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/bip174": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.0.tgz",
- "integrity": "sha512-lkc0XyiX9E9KiVAS1ZiOqK1xfiwvf4FXDDdkDq5crcDzOq+xGytY+14qCsqz7kCiy8rpN1CRNfacRhf9G3JNSA==",
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/bip32": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
- "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
- "dependencies": {
- "@types/node": "10.12.18",
- "bs58check": "^2.1.1",
- "create-hash": "^1.2.0",
- "create-hmac": "^1.1.7",
- "tiny-secp256k1": "^1.1.3",
- "typeforce": "^1.11.5",
- "wif": "^2.0.6"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/bip32-path": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz",
- "integrity": "sha512-ZBMCELjJfcNMkz5bDuJ1WrYvjlhEF5k6mQ8vUr4N7MbVRsXei7ZOg8VhhwMfNiW68NWmLkgkc6WvTickrLGprQ=="
- },
- "node_modules/bip32/node_modules/@types/node": {
- "version": "10.12.18",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
- "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
- },
- "node_modules/bip66": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
- "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/bitcoin-ops": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
- "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
- },
- "node_modules/bitcoinjs-lib": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz",
- "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==",
- "dependencies": {
- "bech32": "^1.1.2",
- "bip174": "^2.0.1",
- "bip32": "^2.0.4",
- "bip66": "^1.1.0",
- "bitcoin-ops": "^1.4.0",
- "bs58check": "^2.0.0",
- "create-hash": "^1.1.0",
- "create-hmac": "^1.1.3",
- "merkle-lib": "^2.0.10",
- "pushdata-bitcoin": "^1.0.1",
- "randombytes": "^2.0.1",
- "tiny-secp256k1": "^1.1.1",
- "typeforce": "^1.11.3",
- "varuint-bitcoin": "^1.0.4",
- "wif": "^2.0.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
"node_modules/blakejs": {
"version": "1.1.0",
"license": "CC0-1.0"
@@ -10425,16 +10292,6 @@
"toggle-selection": "^1.0.6"
}
},
- "node_modules/core-js": {
- "version": "3.25.2",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.2.tgz",
- "integrity": "sha512-YB4IAT1bjEfxTJ1XYy11hJAKskO+qmhuDBM8/guIfMz4JvdsAQAqvyb97zXX7JgSrfPLG5mRGFWJwJD39ruq2A==",
- "hasInstallScript": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
"node_modules/core-js-pure": {
"version": "3.24.1",
"dev": true,
@@ -13944,11 +13801,6 @@
"node": "^10.12.0 || >=12.0.0"
}
},
- "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/fill-range": {
"version": "7.0.1",
"dev": true,
@@ -29926,11 +29778,6 @@
"node": ">= 8"
}
},
- "node_modules/merkle-lib": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz",
- "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA=="
- },
"node_modules/merkle-patricia-tree": {
"version": "4.2.4",
"dev": true,
@@ -32629,14 +32476,6 @@
"node": ">=6"
}
},
- "node_modules/pushdata-bitcoin": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz",
- "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==",
- "dependencies": {
- "bitcoin-ops": "^1.3.0"
- }
- },
"node_modules/q": {
"version": "1.5.1",
"dev": true,
@@ -35875,27 +35714,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/tiny-secp256k1": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
- "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
- "hasInstallScript": true,
- "dependencies": {
- "bindings": "^1.3.0",
- "bn.js": "^4.11.8",
- "create-hmac": "^1.1.7",
- "elliptic": "^6.4.0",
- "nan": "^2.13.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/tiny-secp256k1/node_modules/bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- },
"node_modules/tmp": {
"version": "0.0.33",
"dev": true,
@@ -37172,11 +36990,6 @@
"is-typedarray": "^1.0.0"
}
},
- "node_modules/typeforce": {
- "version": "1.18.0",
- "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
- "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
- },
"node_modules/typescript": {
"version": "4.7.4",
"license": "Apache-2.0",
@@ -37601,14 +37414,6 @@
"spdx-expression-parse": "^3.0.0"
}
},
- "node_modules/varuint-bitcoin": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
- "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
- "dependencies": {
- "safe-buffer": "^5.1.1"
- }
- },
"node_modules/vary": {
"version": "1.1.2",
"license": "MIT",
@@ -38124,14 +37929,6 @@
"node": ">=4"
}
},
- "node_modules/wif": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
- "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
- "dependencies": {
- "bs58check": "<3.0.0"
- }
- },
"node_modules/window-size": {
"version": "1.1.1",
"dev": true,
@@ -42820,18 +42617,15 @@
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@heroicons/vue": "^1.0.6",
- "@ledgerhq/hw-app-btc": "^8.0.2",
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
- "@ledgerhq/logs": "^6.10.0",
"@rollup/plugin-inject": "^4.0.4",
"@vitejs/plugin-vue": "^2.3.3",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"autoprefixer": "^10.4.7",
"buffer": "^6.0.3",
- "core-js": "^3.25.2",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
"postcss": "^8.4.14",
@@ -44640,48 +44434,6 @@
"resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.2.tgz",
"integrity": "sha512-iMfEJPWaan8QaZw87WMUnFFRJqveE3FpU2ObTE0ydTJLPJNOUJjjurGBklqdWM/j5BIQvpi3byGKFChfNg8CaQ=="
},
- "@ledgerhq/hw-app-btc": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-btc/-/hw-app-btc-8.0.2.tgz",
- "integrity": "sha512-Bm6VTbNjLwyhJp4o4788OS+A8sRoBssaiQZmFsLpotfJK1mhGwNvDbDZ2WvrbsDhJus4p0mOeC8qcibezLnw3Q==",
- "requires": {
- "@ledgerhq/hw-transport": "^6.27.4",
- "@ledgerhq/logs": "^6.10.0",
- "bip32-path": "^0.4.2",
- "bitcoinjs-lib": "^5.2.0",
- "bs58": "^4.0.1",
- "bs58check": "^2.1.2",
- "invariant": "^2.2.4",
- "ripemd160": "2",
- "semver": "^7.3.5",
- "sha.js": "2",
- "tiny-secp256k1": "1.1.6",
- "varuint-bitcoin": "1.1.2"
- },
- "dependencies": {
- "lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "requires": {
- "yallist": "^4.0.0"
- }
- },
- "semver": {
- "version": "7.3.7",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
- "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
- "requires": {
- "lru-cache": "^6.0.0"
- }
- },
- "yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
- }
- }
- },
"@ledgerhq/hw-app-eth": {
"version": "6.29.6",
"resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-eth/-/hw-app-eth-6.29.6.tgz",
@@ -46857,80 +46609,6 @@
"version": "2.2.0",
"dev": true
},
- "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"
- }
- },
- "bip174": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.0.tgz",
- "integrity": "sha512-lkc0XyiX9E9KiVAS1ZiOqK1xfiwvf4FXDDdkDq5crcDzOq+xGytY+14qCsqz7kCiy8rpN1CRNfacRhf9G3JNSA=="
- },
- "bip32": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
- "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
- "requires": {
- "@types/node": "10.12.18",
- "bs58check": "^2.1.1",
- "create-hash": "^1.2.0",
- "create-hmac": "^1.1.7",
- "tiny-secp256k1": "^1.1.3",
- "typeforce": "^1.11.5",
- "wif": "^2.0.6"
- },
- "dependencies": {
- "@types/node": {
- "version": "10.12.18",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
- "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
- }
- }
- },
- "bip32-path": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz",
- "integrity": "sha512-ZBMCELjJfcNMkz5bDuJ1WrYvjlhEF5k6mQ8vUr4N7MbVRsXei7ZOg8VhhwMfNiW68NWmLkgkc6WvTickrLGprQ=="
- },
- "bip66": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
- "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==",
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "bitcoin-ops": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
- "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
- },
- "bitcoinjs-lib": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz",
- "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==",
- "requires": {
- "bech32": "^1.1.2",
- "bip174": "^2.0.1",
- "bip32": "^2.0.4",
- "bip66": "^1.1.0",
- "bitcoin-ops": "^1.4.0",
- "bs58check": "^2.0.0",
- "create-hash": "^1.1.0",
- "create-hmac": "^1.1.3",
- "merkle-lib": "^2.0.10",
- "pushdata-bitcoin": "^1.0.1",
- "randombytes": "^2.0.1",
- "tiny-secp256k1": "^1.1.1",
- "typeforce": "^1.11.3",
- "varuint-bitcoin": "^1.0.4",
- "wif": "^2.0.1"
- }
- },
"blakejs": {
"version": "1.1.0"
},
@@ -48217,11 +47895,6 @@
"toggle-selection": "^1.0.6"
}
},
- "core-js": {
- "version": "3.25.2",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.2.tgz",
- "integrity": "sha512-YB4IAT1bjEfxTJ1XYy11hJAKskO+qmhuDBM8/guIfMz4JvdsAQAqvyb97zXX7JgSrfPLG5mRGFWJwJD39ruq2A=="
- },
"core-js-pure": {
"version": "3.24.1",
"dev": true
@@ -50475,11 +50148,6 @@
"flat-cache": "^3.0.4"
}
},
- "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=="
- },
"fill-range": {
"version": "7.0.1",
"dev": true,
@@ -61966,11 +61634,6 @@
"version": "1.4.1",
"dev": true
},
- "merkle-lib": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz",
- "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA=="
- },
"merkle-patricia-tree": {
"version": "4.2.4",
"dev": true,
@@ -63793,14 +63456,6 @@
"punycode": {
"version": "2.1.0"
},
- "pushdata-bitcoin": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz",
- "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==",
- "requires": {
- "bitcoin-ops": "^1.3.0"
- }
- },
"q": {
"version": "1.5.1",
"dev": true
@@ -65988,25 +65643,6 @@
"timed-out": {
"version": "4.0.1"
},
- "tiny-secp256k1": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
- "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
- "requires": {
- "bindings": "^1.3.0",
- "bn.js": "^4.11.8",
- "create-hmac": "^1.1.7",
- "elliptic": "^6.4.0",
- "nan": "^2.13.2"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
- }
- },
"tmp": {
"version": "0.0.33",
"dev": true,
@@ -66789,11 +66425,6 @@
"is-typedarray": "^1.0.0"
}
},
- "typeforce": {
- "version": "1.18.0",
- "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
- "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
- },
"typescript": {
"version": "4.7.4"
},
@@ -67082,14 +66713,6 @@
"spdx-expression-parse": "^3.0.0"
}
},
- "varuint-bitcoin": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
- "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
- "requires": {
- "safe-buffer": "^5.1.1"
- }
- },
"vary": {
"version": "1.1.2"
},
@@ -67419,14 +67042,6 @@
}
}
},
- "wif": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
- "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
- "requires": {
- "bs58check": "<3.0.0"
- }
- },
"window-size": {
"version": "1.1.1",
"dev": true,
diff --git a/scripts/ethereum/dev b/scripts/ethereum/dev
index b1e620555..ed56b3b53 100755
--- a/scripts/ethereum/dev
+++ b/scripts/ethereum/dev
@@ -33,7 +33,7 @@ done
# Secret ID is just the name or ARN
ledger_seed_secret_id=consensus-networks-ledger-seed
-echo "🤫 Getting $ledger_seed_secret_id for $profile"
+echo "Getting $ledger_seed_secret_id for $profile"
# Get the secret from AWS
ledger_seed=$(aws secretsmanager get-secret-value \
@@ -50,7 +50,7 @@ if [ -z "$fork" ]; then
else
# Secret ID is just the name or ARN
alchemy_secret_id=consensus-networks-alchemy-$fork
- echo "🤫 Getting $alchemy_secret_id for $profile"
+ echo "Getting $alchemy_secret_id for $profile"
# Get the secret from AWS
alchemy_key=$(aws secretsmanager get-secret-value \
diff --git a/scripts/local/dev b/scripts/local/dev
index a8c729473..766c2d189 100755
--- a/scripts/local/dev
+++ b/scripts/local/dev
@@ -28,13 +28,21 @@ if [ "$app" == "landing" ]; then
else
# Default app
app="web"
+ chains="ethereum"
services=""
+
+ # Loop over comma-separated string of chains
+ IFS=',' read -r -a chain_list <<< "$chains"
+
+ for chain in "${chain_list[@]}"
+ do
+ commands+=("npm run dev:$chain")
+ done
fi
commands=("npm run dev --workspace @casimir/$app")
if [ -n "$mock" ]; then
-
# Loop over comma-separated string of services
IFS=',' read -r -a service_list <<< "$services"
port=3999
From 88808ed21daf97a7c55c625ff80581db4d0f2571 Mon Sep 17 00:00:00 2001
From: Shane Earley
Date: Tue, 4 Oct 2022 17:47:36 -0400
Subject: [PATCH 12/40] Add default local networks to dev script
---
apps/web/src/composables/ledger.ts | 75 +++++++++++++---------
apps/web/src/composables/wallet.ts | 43 +++----------
apps/web/src/interfaces/TransactionInit.ts | 8 +++
contracts/evm/hardhat.config.ts | 31 +++------
contracts/evm/package.json | 3 +-
package.json | 4 +-
scripts/ethereum/dev | 60 +++++++++--------
scripts/ledger/emulate | 1 -
scripts/local/dev | 32 ++++++++-
9 files changed, 132 insertions(+), 125 deletions(-)
create mode 100644 apps/web/src/interfaces/TransactionInit.ts
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index 198a22443..89af08d45 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -1,10 +1,13 @@
import SpeculosHttpTransport from '@casimir/hw-transport-speculos'
import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
-import Eth from '@ledgerhq/hw-app-eth'
+import Eth, { ledgerService } from '@ledgerhq/hw-app-eth'
import { ethers } from 'ethers'
+import { TransactionInit } from '@/interfaces/TransactionInit'
+import { Deferrable } from '@ethersproject/properties'
+import { TransactionRequest } from '@ethersproject/abstract-provider'
export default function useLedger() {
- const bip32Path = "44'/60'/0'/0/0"
+ const bip32Path = '44\'/60\'/0\'/0/0'
async function getLedgerEthSigner() {
const transport = await _getLedgerTransport()
@@ -21,42 +24,50 @@ export default function useLedger() {
}
}
- // look at ethers.utils.UnsignedTransaction to make sure that doesn't suffice for you
- // @shanejonas - Is there a ethers.utils.UnsignedTransaction method? https://docs.ethers.io/v5/api/utils/transactions/#transactions--functions
- // a type, see line below
- // @cccccali can I get term access. stepping away for aminute but can go audio in a bit
- async function sendLedgerTransaction(
- transaction: ethers.utils.UnsignedTransaction
- ) {
- const provider = new ethers.providers.JsonRpcProvider(
- import.meta.env.ETHEREUM_RPC || 'http://127.0.0.1:8545'
- )
- const _eth = await getLedgerEthSigner()
- const unsignedTransaction = ethers.utils
- .serializeTransaction(transaction)
- .substring(2)
+ async function sendLedgerTransaction({ from, to, value }: TransactionInit) {
+ const rpcUrl = import.meta.env.PUBLIC_ETHEREUM_RPC || 'http://localhost:8545/'
+ const provider = new ethers.providers.JsonRpcProvider(rpcUrl)
+ const { chainId } = await provider.getNetwork()
+ const gasPriceHex = (await provider.getGasPrice())._hex
+ const gasPrice = '0x' + (parseInt(gasPriceHex, 16) * 1.15).toString(16)
+ const nonce = await provider.getTransactionCount(from, 'latest')
+ const unsignedTransaction: ethers.utils.UnsignedTransaction = {
+ to,
+ gasPrice,
+ nonce,
+ chainId,
+ data: '0x00',
+ value: ethers.utils.parseUnits(value)
+ }
- // TODO: Add resolution as third argument in signature
- // import ledgerService from '@ledgerhq/hw-app-eth/lib/services/ledger'
- // const resolution = await ledgerService.resolveTransaction(transaction)
- // console.log('resolution :>> ', resolution)
- const signature = await _eth.signTransaction(
+ // Todo check before click (user can +/- gas limit accordingly)
+ const gasEstimate = await provider.estimateGas(unsignedTransaction as Deferrable)
+ const gasLimit = Math.ceil(parseInt(gasEstimate.toString()) * 1.3)
+ unsignedTransaction.gasLimit = ethers.utils.hexlify(gasLimit)
+ const balance = await provider.getBalance(from)
+ const required = ethers.BigNumber.from(gasPrice).mul(gasLimit).add(ethers.utils.parseEther(value))
+ console.log('Balance', ethers.utils.formatEther(balance))
+ console.log('Required', ethers.utils.formatEther(required))
+
+ const ledger = await getLedgerEthSigner()
+ const rawUnsignedTransaction = ethers.utils.serializeTransaction(unsignedTransaction).substring(2)
+ const resolution = await ledgerService.resolveTransaction(rawUnsignedTransaction, {}, {})
+ const { v, r, s } = await ledger.signTransaction(
bip32Path,
- unsignedTransaction
- // resolution
+ rawUnsignedTransaction,
+ resolution
)
- signature.r = '0x' + signature.r
- signature.s = '0x' + signature.s
-
- // TODO: Fix types here
- signature.v = parseInt(signature.v)
- signature.from = transaction.value // @chris there's just no way
+ const signature = {
+ v: parseInt(v),
+ r: '0x' + r,
+ s: '0x' + s,
+ from
+ }
const signedTransaction = ethers.utils.serializeTransaction(
- transaction,
+ unsignedTransaction,
signature
)
- const txHash = await provider.sendTransaction(signedTransaction)
- console.log('txHash :>> ', txHash)
+ return await provider.sendTransaction(signedTransaction)
}
async function signMessageWithLedger(message: string) {
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index d57597235..d03241b31 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -22,7 +22,7 @@ const {
} = useWalletConnect()
const amount = ref('0.001')
-const toAddress = ref('0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203')
+const toAddress = ref('0x728474D29c2F81eb17a669a7582A2C17f1042b57')
// Test ethereum send to address : 0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
@@ -92,6 +92,7 @@ export default function useWallet() {
if (provider === 'WalletConnect') {
await sendWalletConnectTransaction(amount.value, toAddress.value)
} else if (ethersProviderList.includes(provider)) {
+ // Move this into ethers composable mimicking ledger composable
const browserProvider =
availableProviders.value[provider as keyof BrowserProviders]
const web3Provider: ethers.providers.Web3Provider =
@@ -102,44 +103,18 @@ export default function useWallet() {
to: toAddress.value,
value: etherAmount,
}
- signer.sendTransaction(tx).then((txObj) => {
- console.log('successful txHash: ', txObj.hash)
- })
+ const { hash } = await signer.sendTransaction(tx)
+ console.log('Transaction sent', hash)
} else if (selectedProvider.value === 'IoPay') {
await sendIoPayTransaction(toAddress.value, amount.value)
} else if (selectedProvider.value === 'Ledger') {
- const chainId = 5 // TODO: Replace according to selected testnet
-
- // TODO: Figure out how to set gasLimit and gasPrice for transaction
- const infuraProvider = new ethers.providers.JsonRpcProvider(
- 'https://goerli.infura.io/v3/4e8acb4e58bb4cb9978ac4a22f3326a7'
- )
- const gasLimit = await infuraProvider.estimateGas({
- to: toAddress.value,
- value: ethers.utils.parseEther(amount.value),
- })
- const gasPrice = await infuraProvider.getGasPrice()
-
- // TODO: Add this once we have a way to get the nonce from the ledger
- // let nonce = await provider.getTransactionCount(selectedAccount.value, "latest");
- console.log('current address: ', selectedAccount.value)
- const transaction = {
+ const transactionInit = {
+ from: selectedAccount.value,
to: toAddress.value,
- gasPrice: gasPrice,
- gasLimit: gasLimit,
- // gasLimit: ethers.utils.hexlify(gasLimit),
- // nonce: nonce,
- chainId: chainId,
- data: '0x00',
- value: ethers.utils.parseUnits(amount.value, 'ether')._hex,
+ value: amount.value
}
- await sendLedgerTransaction(transaction)
- // TODO: Remove after testing with speculos or on Goerli testnet
- // npm run dev:ethereum in another process
- // Create - { to: ... }
- // Serialize - ethers.utils.serializeTransaction
- // Sign - ledgerEth.signTransaction
- // Send - (new ethers.providers.JsonRpcProvider("http://127.0.0.1:8545")).sendTransaction
+ const { hash } = await sendLedgerTransaction(transactionInit)
+ console.log('Transaction sent', hash)
} else {
throw new Error('Provider selected not yet supported')
}
diff --git a/apps/web/src/interfaces/TransactionInit.ts b/apps/web/src/interfaces/TransactionInit.ts
new file mode 100644
index 000000000..ba0be5338
--- /dev/null
+++ b/apps/web/src/interfaces/TransactionInit.ts
@@ -0,0 +1,8 @@
+export interface TransactionInit {
+ /** The transaction sender's address */
+ from: string;
+ /** The transaction receiver's address */
+ to: string;
+ /** The value of the transaction */
+ value: string;
+}
\ No newline at end of file
diff --git a/contracts/evm/hardhat.config.ts b/contracts/evm/hardhat.config.ts
index 379ce0178..fffccf6a6 100644
--- a/contracts/evm/hardhat.config.ts
+++ b/contracts/evm/hardhat.config.ts
@@ -1,28 +1,15 @@
import localtunnel from 'localtunnel'
import os from 'os'
-import { task } from 'hardhat/config'
import '@typechain/hardhat'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-ethers'
import { HardhatUserConfig } from 'hardhat/config'
-// https://hardhat.org/guides/create-task.html
-task(
- 'accounts',
- 'Prints the list of accounts',
- async (taskArgs: any, hre: { ethers: { getSigners: () => any } }) => {
- const accounts = await hre.ethers.getSigners()
-
- for (const account of accounts) {
- console.log(account.address)
- }
- }
-)
-
// Use Ledger seed for consistency from localnet to testnet
const defaultSeed =
'test test test test test test test test test test test junk'
-const mnemonic = process.env.LEDGER_SEED || defaultSeed
+const mnemonic = process.env.BIP39_SEED || defaultSeed
+console.log('Your mnemonic is', mnemonic)
// Get fork RPC url if provided
const forkUrl = process.env.FORK_URL
@@ -41,18 +28,16 @@ const config: HardhatUserConfig = {
},
networks: {
hardhat: {
- accounts: { mnemonic, accountsBalance: '32000000000000000000' },
+ accounts: { mnemonic, accountsBalance: '48000000000000000000', count: 2 },
chainId: 1337,
- forking: forkUrl ? { url: forkUrl } : undefined,
- },
- },
+ forking: forkUrl ? { url: forkUrl } : undefined
+ }
+ }
}
-if (process.env.LOCAL_DEV) {
- console.log('Your mnemonic is', mnemonic)
-
+if (process.env.LOCAL_TUNNEL) {
// Start a local tunnel for using RPC over https
- const localSubdomain = `cn-hh-${os.userInfo().username.toLowerCase()}`
+ const localSubdomain = `cn-hardhat-${os.userInfo().username.toLowerCase()}`
const localUrl = `https://${localSubdomain}.loca.lt`
console.log('Your local tunnel is', localUrl)
localtunnel({ port: 8545, subdomain: localSubdomain }).then(
diff --git a/contracts/evm/package.json b/contracts/evm/package.json
index d5cd2f56c..6247c39aa 100644
--- a/contracts/evm/package.json
+++ b/contracts/evm/package.json
@@ -3,10 +3,9 @@
"scripts": {
"deploy:sample": "npx hardhat run deploy/sample.ts",
"test:contracts": "npx hardhat test",
- "task:accounts": "npx hardhat accounts",
"task:compile": "npx hardhat compile",
"task:clean": "npx hardhat clean",
- "dev:localnode": "npx hardhat node"
+ "dev:node": "npx hardhat node"
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
diff --git a/package.json b/package.json
index 855021b1a..92ccfcf66 100644
--- a/package.json
+++ b/package.json
@@ -13,8 +13,8 @@
"clean": "npm exec --workspaces -- npx rimraf node_modules && npx rimraf node_modules && npm i",
"deploy": "scripts/cdk/deploy -d infrastructure/cdk",
"deploy:templates": "scripts/pinpoint/deploy -d content/email/templates",
- "dev": "scripts/local/dev -m \"$npm_config_mock\" -s \"$npm_config_speculos\"",
- "dev:ethereum": "scripts/ethereum/dev -f \"$npm_config_fork\"",
+ "dev": "scripts/local/dev -f \"$npm_config_fork\" -m \"$npm_config_mock\" -n \"$npm_config_network\" -s \"$npm_config_speculos\" -t \"$npm_config_tunnel\"",
+ "dev:ethereum": "scripts/ethereum/dev -f \"$npm_config_fork\" -n \"$npm_config_network\"",
"dev:landing": "scripts/local/dev -a \"landing\" -m \"$npm_config_mock\"",
"lint": "eslint --ext .vue,.ts ./ --fix",
"test": "echo \"Error: no test specified\" && exit 1",
diff --git a/scripts/ethereum/dev b/scripts/ethereum/dev
index ed56b3b53..daafc29c7 100755
--- a/scripts/ethereum/dev
+++ b/scripts/ethereum/dev
@@ -3,7 +3,7 @@
#
# Example:
#
-# scripts/ethereum/dev -f
+# scripts/ethereum/dev -f -n
#
# Further information:
# See https://hardhat.org/hardhat-network/docs/overview
@@ -24,43 +24,47 @@ else
fi
# Get args
-while getopts f: flag
+while getopts :f:n: flag
do
case "${flag}" in
f) fork=${OPTARG};;
+ n) network=${OPTARG};;
esac
done
-# Secret ID is just the name or ARN
-ledger_seed_secret_id=consensus-networks-ledger-seed
-echo "Getting $ledger_seed_secret_id for $profile"
-
-# Get the secret from AWS
-ledger_seed=$(aws secretsmanager get-secret-value \
---secret-id $ledger_seed_secret_id \
---query SecretString \
---output text \
---profile $profile)
-
-export LEDGER_SEED="$ledger_seed"
-
-if [ -z "$fork" ]; then
- echo "⛓ Running default localnode"
- npm run dev:localnode --workspace @casimir/evm
-else
- # Secret ID is just the name or ARN
- alchemy_secret_id=consensus-networks-alchemy-$fork
- echo "Getting $alchemy_secret_id for $profile"
-
- # Get the secret from AWS
- alchemy_key=$(aws secretsmanager get-secret-value \
- --secret-id $alchemy_secret_id \
+# Expose RPC URL directly if network is set to mainnet or testnet
+if [ -n "$network" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-ethereum-$network
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
--query SecretString \
--output text \
--profile $profile)
- echo "⛓ Running $fork fork localnode"
- npm run dev:localnode --workspace @casimir/evm -- --fork https://eth-$fork.alchemyapi.io/v2/$alchemy_key
+ export PUBLIC_ETHEREUM_RPC="https://eth-$network.g.alchemy.com/v2/$rpc_key"
+ # Uncomment below for work on issue https://github.com/consensusnetworks/casimir/issues/24
+ # export PUBLIC_SSV_ADDRESS="" # Todo get address (deterministic from deployer + tx count)
+else
+ if [ -n "$fork" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-ethereum-$fork
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
+ --query SecretString \
+ --output text \
+ --profile $profile)
+
+ echo "⛓ Setting up ethereum chain with $fork fork"
+ npm run dev:node --workspace @casimir/evm -- --fork "https://eth-$fork.g.alchemy.com/v2/$rpc_key"
+ else
+ echo "⛓ Setting up ethereum chain without fork"
+ npm run dev:node --workspace @casimir/evm
+ fi
+
+ # Uncomment below for work on issue https://github.com/consensusnetworks/casimir/issues/24
+ # npm run deploy:ssv --workspace @casimir/evm
+ # export PUBLIC_SSV_ADDRESS="" # Todo get address (deterministic from deployer + tx count)
fi
diff --git a/scripts/ledger/emulate b/scripts/ledger/emulate
index 0967563dc..7c605c676 100755
--- a/scripts/ledger/emulate
+++ b/scripts/ledger/emulate
@@ -56,7 +56,6 @@ cd $resource_path/speculos
# Secret ID is just the name or ARN
ledger_seed_secret_id=consensus-networks-ledger-seed
-echo "🤫 Getting $ledger_seed_secret_id for $profile"
# Get the secret from AWS
ledger_seed=$(aws secretsmanager get-secret-value \
diff --git a/scripts/local/dev b/scripts/local/dev
index 766c2d189..3e6ed5158 100755
--- a/scripts/local/dev
+++ b/scripts/local/dev
@@ -11,18 +11,38 @@
# Configure and expose variables
source scripts/aws/configure
+
+# Set the stage
export PUBLIC_STAGE=${STAGE}
+# Secret ID is just the name or ARN
+seed_secret_id=consensus-networks-bip39-seed
+
+# Get the secret from AWS
+seed=$(aws secretsmanager get-secret-value \
+--secret-id $seed_secret_id \
+--query SecretString \
+--output text \
+--profile $profile)
+
+# Set the shared bip39 seed
+export BIP39_SEED="$seed"
+
# Get args
-while getopts :a:m:s: flag
+while getopts :a:f:m:n:s:t: flag
do
case "${flag}" in
a) app=${OPTARG};;
+ f) fork=${OPTARG};;
m) mock=${OPTARG};;
+ n) network=${OPTARG};;
s) speculos=${OPTARG};;
+ t) tunnel=${OPTARG};;
esac
done
+commands=()
+
if [ "$app" == "landing" ]; then
services="users"
else
@@ -36,11 +56,17 @@ else
for chain in "${chain_list[@]}"
do
- commands+=("npm run dev:$chain")
+ # Pass fork or network to chain-specific script
+ commands+=("npm run dev:$chain --fork=$fork --network=$network")
done
+
+ # Tunnel local (default) chain networks if specified
+ if [ -z "$network" ] && [ -n "$tunnel" ]; then
+ export LOCAL_TUNNEL="$tunnel"
+ fi
fi
-commands=("npm run dev --workspace @casimir/$app")
+commands+=("npm run dev --workspace @casimir/$app")
if [ -n "$mock" ]; then
# Loop over comma-separated string of services
From f30fe81a7764efcdf77a256b961cb02cc944e1a0 Mon Sep 17 00:00:00 2001
From: Shane Earley
Date: Tue, 4 Oct 2022 18:43:07 -0400
Subject: [PATCH 13/40] Add parenthesis around pwd in ledger compile
---
scripts/ledger/compile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/ledger/compile b/scripts/ledger/compile
index fa6d85aa2..0498b4366 100755
--- a/scripts/ledger/compile
+++ b/scripts/ledger/compile
@@ -29,7 +29,7 @@ echo "🔨 Building $app app for ledger"
cd $resource_path/app-$app
docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder
docker tag ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder ledger-app-builder
-docker run --rm -v "$pwd:/app" ledger-app-builder sh -c "make clean && make && exit"
+docker run --rm -v "$(pwd):/app" ledger-app-builder sh -c "make clean && make && exit"
# Copy app to speculos apps folder
echo "📲 Copying $app app to speculos apps folder"
From 8f294b1645ca77aa4492fff751d3ec5212cd7e5b Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Wed, 5 Oct 2022 12:50:56 -0500
Subject: [PATCH 14/40] Offload the ethereum browser wallet logic to ethers.ts
from connectWallet
---
.vscode/settings.json | 12 ++++++
apps/web/src/composables/ethers.ts | 46 ++++++++++++++++++++--
apps/web/src/composables/ledger.ts | 32 +++++++++------
apps/web/src/composables/wallet.ts | 35 +---------------
apps/web/src/interfaces/TransactionInit.ts | 3 +-
5 files changed, 79 insertions(+), 49 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index d783e2bc6..36f044b5c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -2,6 +2,18 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
+ "[html]": {
+ "editor.defaultFormatter": "Vue.volar"
+ },
+ "[vue]": {
+ "editor.defaultFormatter": "Vue.volar"
+ },
+ "[javascript]": {
+ "editor.defaultFormatter": "vscode.typescript-language-features"
+ },
+ "[json]": {
+ "editor.defaultFormatter": "vscode.json-language-features"
+ },
"eslint.validate": [
"vue",
"typescript"
diff --git a/apps/web/src/composables/ethers.ts b/apps/web/src/composables/ethers.ts
index 79b54bbb7..e8d436cce 100644
--- a/apps/web/src/composables/ethers.ts
+++ b/apps/web/src/composables/ethers.ts
@@ -1,13 +1,51 @@
+import { ref } from 'vue'
+import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { EthersProvider } from '@/interfaces/EthersProvider'
+import { ProviderString } from '@/types/ProviderString'
+
+const defaultProviders = {
+ MetaMask: undefined,
+ CoinbaseWallet: undefined,
+}
+
+const ethereum: any = window.ethereum
+const availableProviders = ref(
+ getBrowserProviders(ethereum)
+)
export default function useEthers() {
- async function requestEthersAccount(provider: EthersProvider) {
- if (provider.request) {
- return await provider.request({
+ const ethersProviderList = ['MetaMask', 'CoinbaseWallet']
+ async function requestEthersAccount(provider: ProviderString) {
+ const browserExtensionProvider =
+ availableProviders.value[provider as keyof BrowserProviders]
+ if (browserExtensionProvider?.request) {
+ return await browserExtensionProvider.request({
method: 'eth_requestAccounts',
})
}
}
- return { requestEthersAccount }
+ async function sendEthersTransaction(
+ provider: EthersProvider,
+ transaction: TransactionInit
+ ) {
+ return await provider.sendTransaction(transaction)
+ }
+
+ return { ethersProviderList, requestEthersAccount, getBrowserProviders, sendEthersTransaction }
}
+
+function getBrowserProviders(ethereum: any) {
+ if (!ethereum) return defaultProviders
+ else if (!ethereum.providerMap) {
+ return {
+ MetaMask: ethereum.isMetaMask ? ethereum : undefined,
+ CoinbaseWallet: ethereum.isCoinbaseWallet ? ethereum : undefined,
+ }
+ } else {
+ return {
+ MetaMask: ethereum.providerMap.get('MetaMask'),
+ CoinbaseWallet: ethereum.providerMap.get('CoinbaseWallet'),
+ }
+ }
+}
\ No newline at end of file
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index 89af08d45..52763856f 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -27,10 +27,10 @@ export default function useLedger() {
async function sendLedgerTransaction({ from, to, value }: TransactionInit) {
const rpcUrl = import.meta.env.PUBLIC_ETHEREUM_RPC || 'http://localhost:8545/'
const provider = new ethers.providers.JsonRpcProvider(rpcUrl)
- const { chainId } = await provider.getNetwork()
- const gasPriceHex = (await provider.getGasPrice())._hex
- const gasPrice = '0x' + (parseInt(gasPriceHex, 16) * 1.15).toString(16)
- const nonce = await provider.getTransactionCount(from, 'latest')
+ const { chainId } = await provider.getNetwork() // Why this?
+ const gasPriceHex = (await provider.getGasPrice())._hex // What is offering us this?
+ const gasPrice = '0x' + (parseInt(gasPriceHex, 16) * 1.15).toString(16) // Why this?
+ const nonce = await provider.getTransactionCount(from, 'latest') // Why do we have the option not to provide this?
const unsignedTransaction: ethers.utils.UnsignedTransaction = {
to,
gasPrice,
@@ -38,20 +38,30 @@ export default function useLedger() {
chainId,
data: '0x00',
value: ethers.utils.parseUnits(value)
- }
+ } // What did I have before??
- // Todo check before click (user can +/- gas limit accordingly)
- const gasEstimate = await provider.estimateGas(unsignedTransaction as Deferrable)
+ // Todo check before click (user can +/- gas limit accordingly) // Are you saying to provide another front-end input field for gas limit?
+ const gasEstimate = await provider.estimateGas(
+ unsignedTransaction as Deferrable
+ ) // Why is this a thing (having a gasEstimate and gasLimit)?
const gasLimit = Math.ceil(parseInt(gasEstimate.toString()) * 1.3)
unsignedTransaction.gasLimit = ethers.utils.hexlify(gasLimit)
const balance = await provider.getBalance(from)
- const required = ethers.BigNumber.from(gasPrice).mul(gasLimit).add(ethers.utils.parseEther(value))
+ const required = ethers.BigNumber.from(gasPrice)
+ .mul(gasLimit)
+ .add(ethers.utils.parseEther(value))
console.log('Balance', ethers.utils.formatEther(balance))
console.log('Required', ethers.utils.formatEther(required))
const ledger = await getLedgerEthSigner()
- const rawUnsignedTransaction = ethers.utils.serializeTransaction(unsignedTransaction).substring(2)
- const resolution = await ledgerService.resolveTransaction(rawUnsignedTransaction, {}, {})
+ const rawUnsignedTransaction = ethers.utils
+ .serializeTransaction(unsignedTransaction)
+ .substring(2)
+ const resolution = await ledgerService.resolveTransaction(
+ rawUnsignedTransaction,
+ {},
+ {}
+ )
const { v, r, s } = await ledger.signTransaction(
bip32Path,
rawUnsignedTransaction,
@@ -61,7 +71,7 @@ export default function useLedger() {
v: parseInt(v),
r: '0x' + r,
s: '0x' + s,
- from
+ from,
}
const signedTransaction = ethers.utils.serializeTransaction(
unsignedTransaction,
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index d03241b31..b68bf7e25 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -4,17 +4,10 @@ import useIoPay from '@/composables/iopay'
import useLedger from '@/composables/ledger'
import useEthers from '@/composables/ethers'
import useWalletConnect from '@/composables/walletConnect'
-import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { EthersProvider } from '@/interfaces/EthersProvider'
import { ProviderString } from '@/types/ProviderString'
-const defaultProviders = {
- MetaMask: undefined,
- CoinbaseWallet: undefined,
-}
-const ethersProviderList = ['MetaMask', 'CoinbaseWallet']
-
-const { requestEthersAccount } = useEthers()
+const { ethersProviderList, requestEthersAccount } = useEthers()
const {
enableWalletConnect,
disableWalletConnect,
@@ -35,10 +28,6 @@ export default function useWallet() {
signMessageWithLedger,
sendLedgerTransaction,
} = useLedger()
- const ethereum: any = window.ethereum
- const availableProviders = ref(
- getBrowserProviders(ethereum)
- )
const selectedProvider = ref('')
const selectedAccount = ref('')
const setSelectedProvider = (provider: ProviderString) => {
@@ -55,10 +44,8 @@ export default function useWallet() {
if (provider === 'WalletConnect') {
enableWalletConnect()
} else if (ethersProviderList.includes(provider)) {
- const browserExtensionProvider =
- availableProviders.value[provider as keyof BrowserProviders]
const accounts = await requestEthersAccount(
- browserExtensionProvider as EthersProvider
+ provider as ProviderString
)
const address = accounts[0]
setSelectedAccount(address)
@@ -136,9 +123,6 @@ export default function useWallet() {
const hashedMessage = ethers.utils.id(message)
const signature = await signer.signMessage(hashedMessage)
// TODO: Mock sending hash and signature to backend for verification
- console.log('message :>> ', message)
- console.log('hashedMessage :>> ', hashedMessage)
- console.log('signature: ', signature)
} else if (selectedProvider.value === 'IoPay') {
const hashedMessage = ethers.utils.id(message)
await signIoPayMessage(hashedMessage)
@@ -164,18 +148,3 @@ export default function useWallet() {
signMessage,
}
}
-
-function getBrowserProviders(ethereum: any) {
- if (!ethereum) return defaultProviders
- else if (!ethereum.providerMap) {
- return {
- MetaMask: ethereum.isMetaMask ? ethereum : undefined,
- CoinbaseWallet: ethereum.isCoinbaseWallet ? ethereum : undefined,
- }
- } else {
- return {
- MetaMask: ethereum.providerMap.get('MetaMask'),
- CoinbaseWallet: ethereum.providerMap.get('CoinbaseWallet'),
- }
- }
-}
diff --git a/apps/web/src/interfaces/TransactionInit.ts b/apps/web/src/interfaces/TransactionInit.ts
index ba0be5338..8ad38ce65 100644
--- a/apps/web/src/interfaces/TransactionInit.ts
+++ b/apps/web/src/interfaces/TransactionInit.ts
@@ -1,4 +1,5 @@
-export interface TransactionInit {
+import ethers from 'ethers'
+export interface TransactionInit extends ethers.providers.TransactionRequest {
/** The transaction sender's address */
from: string;
/** The transaction receiver's address */
From 2522eaedf8340ba20689428b21d79429e053bafb Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Wed, 5 Oct 2022 13:14:43 -0500
Subject: [PATCH 15/40] Move ethereum browser wallet sendTransaction logic to
ethers.ts
---
apps/web/src/composables/ethers.ts | 22 +++++++++++++++++++---
apps/web/src/composables/wallet.ts | 23 +++++++++--------------
2 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/apps/web/src/composables/ethers.ts b/apps/web/src/composables/ethers.ts
index e8d436cce..62ada9f2b 100644
--- a/apps/web/src/composables/ethers.ts
+++ b/apps/web/src/composables/ethers.ts
@@ -1,4 +1,5 @@
import { ref } from 'vue'
+import { ethers } from 'ethers'
import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { EthersProvider } from '@/interfaces/EthersProvider'
import { ProviderString } from '@/types/ProviderString'
@@ -26,10 +27,25 @@ export default function useEthers() {
}
async function sendEthersTransaction(
- provider: EthersProvider,
- transaction: TransactionInit
+ providerString: ProviderString,
+ { to, value }: { to: string; value: string }
) {
- return await provider.sendTransaction(transaction)
+ const ethereum: any = window.ethereum
+ const availableProviders = ref(
+ getBrowserProviders(ethereum)
+ )
+ const browserProvider =
+ availableProviders.value[providerString as keyof BrowserProviders]
+ const web3Provider: ethers.providers.Web3Provider =
+ new ethers.providers.Web3Provider(browserProvider as EthersProvider)
+ const signer = web3Provider.getSigner()
+ const etherAmount = ethers.utils.parseEther(value)
+ const tx = {
+ to,
+ value: etherAmount,
+ }
+ const { hash } = await signer.sendTransaction(tx)
+ return hash
}
return { ethersProviderList, requestEthersAccount, getBrowserProviders, sendEthersTransaction }
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index b68bf7e25..02ca55d4a 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -7,7 +7,7 @@ import useWalletConnect from '@/composables/walletConnect'
import { EthersProvider } from '@/interfaces/EthersProvider'
import { ProviderString } from '@/types/ProviderString'
-const { ethersProviderList, requestEthersAccount } = useEthers()
+const { ethersProviderList, requestEthersAccount, sendEthersTransaction } = useEthers()
const {
enableWalletConnect,
disableWalletConnect,
@@ -16,6 +16,10 @@ const {
const amount = ref('0.001')
const toAddress = ref('0x728474D29c2F81eb17a669a7582A2C17f1042b57')
+const tx = ref({
+ to: toAddress.value,
+ value: amount.value,
+})
// Test ethereum send to address : 0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
@@ -79,19 +83,10 @@ export default function useWallet() {
if (provider === 'WalletConnect') {
await sendWalletConnectTransaction(amount.value, toAddress.value)
} else if (ethersProviderList.includes(provider)) {
- // Move this into ethers composable mimicking ledger composable
- const browserProvider =
- availableProviders.value[provider as keyof BrowserProviders]
- const web3Provider: ethers.providers.Web3Provider =
- new ethers.providers.Web3Provider(browserProvider as EthersProvider)
- const signer = web3Provider.getSigner()
- const etherAmount = ethers.utils.parseEther(amount.value)
- const tx = {
- to: toAddress.value,
- value: etherAmount,
- }
- const { hash } = await signer.sendTransaction(tx)
- console.log('Transaction sent', hash)
+ await sendEthersTransaction(
+ provider as ProviderString,
+ tx.value
+ )
} else if (selectedProvider.value === 'IoPay') {
await sendIoPayTransaction(toAddress.value, amount.value)
} else if (selectedProvider.value === 'Ledger') {
From 8809e99f367dc5728251bfcfb66925ea53af40e9 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Wed, 5 Oct 2022 13:21:38 -0500
Subject: [PATCH 16/40] Offload ethereum browser wallet signMessage to
ethers.ts
---
apps/web/src/composables/ethers.ts | 19 ++++++++++++++-----
apps/web/src/composables/wallet.ts | 18 ++++--------------
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/apps/web/src/composables/ethers.ts b/apps/web/src/composables/ethers.ts
index 62ada9f2b..e36f12458 100644
--- a/apps/web/src/composables/ethers.ts
+++ b/apps/web/src/composables/ethers.ts
@@ -30,10 +30,6 @@ export default function useEthers() {
providerString: ProviderString,
{ to, value }: { to: string; value: string }
) {
- const ethereum: any = window.ethereum
- const availableProviders = ref(
- getBrowserProviders(ethereum)
- )
const browserProvider =
availableProviders.value[providerString as keyof BrowserProviders]
const web3Provider: ethers.providers.Web3Provider =
@@ -48,7 +44,20 @@ export default function useEthers() {
return hash
}
- return { ethersProviderList, requestEthersAccount, getBrowserProviders, sendEthersTransaction }
+ async function signEthersMessage(provider: ProviderString, message: string) {
+ const browserProvider =
+ availableProviders.value[
+ provider as keyof BrowserProviders
+ ]
+ const web3Provider: ethers.providers.Web3Provider =
+ new ethers.providers.Web3Provider(browserProvider as EthersProvider)
+ const signer = web3Provider.getSigner()
+ const hashedMessage = ethers.utils.id(message)
+ const signature = await signer.signMessage(hashedMessage)
+ return signature
+ }
+
+ return { ethersProviderList, requestEthersAccount, getBrowserProviders, sendEthersTransaction, signEthersMessage }
}
function getBrowserProviders(ethereum: any) {
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index 02ca55d4a..79caa901c 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -4,10 +4,9 @@ import useIoPay from '@/composables/iopay'
import useLedger from '@/composables/ledger'
import useEthers from '@/composables/ethers'
import useWalletConnect from '@/composables/walletConnect'
-import { EthersProvider } from '@/interfaces/EthersProvider'
import { ProviderString } from '@/types/ProviderString'
-const { ethersProviderList, requestEthersAccount, sendEthersTransaction } = useEthers()
+const { ethersProviderList, requestEthersAccount, sendEthersTransaction, signEthersMessage } = useEthers()
const {
enableWalletConnect,
disableWalletConnect,
@@ -106,24 +105,15 @@ export default function useWallet() {
}
async function signMessage(message: string) {
+ // TODO: Mock sending hash and signature to backend for verification
try {
if (ethersProviderList.includes(selectedProvider.value)) {
- const browserProvider =
- availableProviders.value[
- selectedProvider.value as keyof BrowserProviders
- ]
- const web3Provider: ethers.providers.Web3Provider =
- new ethers.providers.Web3Provider(browserProvider as EthersProvider)
- const signer = web3Provider.getSigner()
- const hashedMessage = ethers.utils.id(message)
- const signature = await signer.signMessage(hashedMessage)
- // TODO: Mock sending hash and signature to backend for verification
+ await signEthersMessage(selectedProvider.value, message)
} else if (selectedProvider.value === 'IoPay') {
const hashedMessage = ethers.utils.id(message)
await signIoPayMessage(hashedMessage)
} else if (selectedProvider.value === 'Ledger') {
- const signedHash = await signMessageWithLedger(message)
- // TODO: Send to backend for verification
+ await signMessageWithLedger(message)
} else {
console.log('signMessage not yet supported for this wallet provider')
}
From 77226863936f6b531489bd82ca5a07b656965484 Mon Sep 17 00:00:00 2001
From: Shane Earley
Date: Wed, 5 Oct 2022 18:22:43 -0400
Subject: [PATCH 17/40] Add crawler test script and refactor existing scripts
---
README.md | 10 +--
contracts/{evm => ethereum}/deploy/sample.ts | 0
contracts/ethereum/hardhat.config.ts | 52 +++++++++++++
contracts/{evm => ethereum}/package.json | 4 +-
contracts/{evm => ethereum}/src/Sample.sol | 0
contracts/{evm => ethereum}/test/sample.ts | 0
contracts/{evm => ethereum}/tsconfig.json | 0
contracts/evm/hardhat.config.ts | 59 --------------
package.json | 13 ++--
scripts/crawler/test | 82 ++++++++++++++++++++
scripts/ethereum/dev | 44 ++++++-----
scripts/ethereum/test | 70 +++++++++++++++++
scripts/local/dev | 63 ++++++++++++++-
13 files changed, 298 insertions(+), 99 deletions(-)
rename contracts/{evm => ethereum}/deploy/sample.ts (100%)
create mode 100644 contracts/ethereum/hardhat.config.ts
rename contracts/{evm => ethereum}/package.json (91%)
rename contracts/{evm => ethereum}/src/Sample.sol (100%)
rename contracts/{evm => ethereum}/test/sample.ts (100%)
rename contracts/{evm => ethereum}/tsconfig.json (100%)
delete mode 100644 contracts/evm/hardhat.config.ts
create mode 100755 scripts/crawler/test
create mode 100755 scripts/ethereum/test
diff --git a/README.md b/README.md
index 9e5bed95a..c2b3f7767 100644
--- a/README.md
+++ b/README.md
@@ -95,21 +95,21 @@ You can get up and running without configuration. You can also mock local backen
### Hardhat
-EVM contract development is serviced through [Hardhat](https://hardhat.io/). The Hardhat development environment is configured in the [contracts/evm/hardhat.config.ts](contracts/evm/hardhat.config.ts) file.
+Ethereum contract development is serviced through [Hardhat](https://hardhat.io/). The Hardhat development environment is configured in the [contracts/ethereum/hardhat.config.ts](contracts/ethereum/hardhat.config.ts) file.
-1. Compile the contracts in [contracts/evm](contracts/evm).
+1. Compile the contracts in [contracts/ethereum](contracts/ethereum).
```zsh
npm run task:compile
```
-2. Deploy a contract, specifically [contracts/evm/src/Sample.sol](contracts/evm/src/Sample.sol) with [contracts/evm/deploy/sample.ts](contracts/evm/deploy/sample.ts).
+2. Deploy a contract, specifically [contracts/ethereum/src/Sample.sol](contracts/ethereum/src/Sample.sol) with [contracts/ethereum/deploy/sample.ts](contracts/ethereum/deploy/sample.ts).
```zsh
npm run deploy:sample
```
-3. Test the Sample with the tests in [contracts/evm/test/sample.ts](contracts/evm/test/sample.ts).
+3. Test the Sample with the tests in [contracts/ethereum/test/sample.ts](contracts/ethereum/test/sample.ts).
```zsh
npm run test:contracts
@@ -127,7 +127,7 @@ EVM contract development is serviced through [Hardhat](https://hardhat.io/). The
// Todo add Casimir Typescript usage
```
-7. Clean [contracts/evm/build/artifacts](contracts/evm/build/artifacts) and [contracts/evm/build/cache](contracts/evm/build/cache)).
+7. Clean [contracts/ethereum/build/artifacts](contracts/ethereum/build/artifacts) and [contracts/ethereum/build/cache](contracts/ethereum/build/cache)).
```zsh
npm run task:clean
diff --git a/contracts/evm/deploy/sample.ts b/contracts/ethereum/deploy/sample.ts
similarity index 100%
rename from contracts/evm/deploy/sample.ts
rename to contracts/ethereum/deploy/sample.ts
diff --git a/contracts/ethereum/hardhat.config.ts b/contracts/ethereum/hardhat.config.ts
new file mode 100644
index 000000000..ef4034bdf
--- /dev/null
+++ b/contracts/ethereum/hardhat.config.ts
@@ -0,0 +1,52 @@
+import localtunnel from 'localtunnel'
+import os from 'os'
+import '@typechain/hardhat'
+import '@nomiclabs/hardhat-waffle'
+import '@nomiclabs/hardhat-ethers'
+import { HardhatUserConfig } from 'hardhat/config'
+
+const forkUrl = process.env.ETHEREUM_FORK_RPC
+const mnemonic = process.env.BIP39_SEED
+
+// Go to https://hardhat.org/config/ to learn more
+const config: HardhatUserConfig = {
+ solidity: '0.8.17',
+ paths: {
+ tests: './test',
+ sources: './src',
+ artifacts: './build/artifacts',
+ cache: './build/cache',
+ },
+ typechain: {
+ outDir: './build/artifacts/types',
+ },
+ networks: {
+ hardhat: {
+ accounts: mnemonic ? { mnemonic, accountsBalance: '48000000000000000000', count: 3 } : undefined,
+ chainId: 1337,
+ forking: forkUrl ? { url: forkUrl } : undefined
+ }
+ }
+}
+
+if (process.env.LOCAL_TUNNEL) {
+ // Start a local tunnel for using RPC over https
+ const localSubdomain = `cn-hardhat-${os.userInfo().username.toLowerCase()}`
+ const localUrl = `https://${localSubdomain}.loca.lt`
+ console.log('Your local tunnel is', localUrl)
+ localtunnel({ port: 8545, subdomain: localSubdomain }).then(
+ (tunnel: localtunnel.Tunnel) => {
+ if (localUrl === tunnel.url) {
+ console.log('Your local tunnel is now available at', localUrl)
+ } else {
+ console.log('Your desired local tunnel url is not available')
+ }
+ process.on('SIGINT', () => {
+ tunnel.close()
+ process.exit(0)
+ })
+ }
+ )
+}
+
+export default config
\ No newline at end of file
diff --git a/contracts/evm/package.json b/contracts/ethereum/package.json
similarity index 91%
rename from contracts/evm/package.json
rename to contracts/ethereum/package.json
index d5cd2f56c..196758754 100644
--- a/contracts/evm/package.json
+++ b/contracts/ethereum/package.json
@@ -1,12 +1,12 @@
{
- "name": "@casimir/evm",
+ "name": "@casimir/ethereum",
"scripts": {
"deploy:sample": "npx hardhat run deploy/sample.ts",
"test:contracts": "npx hardhat test",
"task:accounts": "npx hardhat accounts",
"task:compile": "npx hardhat compile",
"task:clean": "npx hardhat clean",
- "dev:localnode": "npx hardhat node"
+ "dev:node": "npx hardhat node"
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
diff --git a/contracts/evm/src/Sample.sol b/contracts/ethereum/src/Sample.sol
similarity index 100%
rename from contracts/evm/src/Sample.sol
rename to contracts/ethereum/src/Sample.sol
diff --git a/contracts/evm/test/sample.ts b/contracts/ethereum/test/sample.ts
similarity index 100%
rename from contracts/evm/test/sample.ts
rename to contracts/ethereum/test/sample.ts
diff --git a/contracts/evm/tsconfig.json b/contracts/ethereum/tsconfig.json
similarity index 100%
rename from contracts/evm/tsconfig.json
rename to contracts/ethereum/tsconfig.json
diff --git a/contracts/evm/hardhat.config.ts b/contracts/evm/hardhat.config.ts
deleted file mode 100644
index fa972d09b..000000000
--- a/contracts/evm/hardhat.config.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import localtunnel from 'localtunnel'
-import os from 'os'
-import { task } from 'hardhat/config'
-import '@typechain/hardhat'
-import '@nomiclabs/hardhat-waffle'
-import '@nomiclabs/hardhat-ethers'
-import { HardhatUserConfig } from 'hardhat/config'
-
-// https://hardhat.org/guides/create-task.html
-task('accounts', 'Prints the list of accounts', async (taskArgs: any, hre: { ethers: { getSigners: () => any } }) => {
- const accounts = await hre.ethers.getSigners()
-
- for (const account of accounts) {
- console.log(account.address)
- }
-})
-
-// Use Ledger seed for consistency from localnet to testnet
-const defaultSeed = 'test test test test test test test test test test test junk'
-const mnemonic = process.env.LEDGER_SEED || defaultSeed
-console.log('Your mnemonic is', mnemonic)
-
-// Go to https://hardhat.org/config/ to learn more
-const config: HardhatUserConfig = {
- solidity: '0.8.4',
- paths: {
- tests: './test',
- sources: './src',
- artifacts: './build/artifacts',
- cache: './build/cache'
- },
- typechain: {
- outDir: './build/artifacts/types'
- },
- networks: {
- hardhat: {
- chainId: 1337,
- accounts: { mnemonic, accountsBalance: '32000000000000000000' }
- }
- }
-}
-
-// Start a local tunnel for using RPC with https
-const localSubdomain = `cn-hh-${os.userInfo().username.toLowerCase()}`
-const localUrl = `https://${localSubdomain}.loca.lt`
-console.log('Your local tunnel is', localUrl)
-localtunnel({ port: 8545, subdomain: localSubdomain }).then((tunnel: localtunnel.Tunnel) => {
- if (localUrl === tunnel.url) {
- console.log('Your local tunnel is now available at', localUrl)
- } else {
- console.log('Your desired local tunnel url is not available')
- }
- process.on('SIGINT', () => {
- tunnel.close()
- process.exit(0)
- })
-})
-
-export default config
\ No newline at end of file
diff --git a/package.json b/package.json
index 668700317..36e1caa14 100644
--- a/package.json
+++ b/package.json
@@ -10,20 +10,17 @@
"services/*"
],
"scripts": {
- "clean": "npm exec --workspaces -- npx rimraf node_modules && npx rimraf node_modules && npm i",
+ "clean": "npm exec --workspaces -- npx rimraf node_modules && npx rimraf node_modules",
"deploy": "scripts/cdk/deploy -d infrastructure/cdk",
- "dev": "scripts/local/dev -m \"$npm_config_mock\" -s \"$npm_config_speculos\"",
+ "dev": "scripts/local/dev -m \"$npm_config_mock\" -n \"$npm_config_network\" -s \"$npm_config_speculos\"",
"dev:ethereum": "scripts/ethereum/dev -f \"$npm_config_fork\"",
"dev:landing": "scripts/local/dev -a \"landing\" -m \"$npm_config_mock\"",
"lint": "eslint --ext .vue,.ts ./ --fix",
"test": "echo \"Error: no test specified\" && exit 1",
+ "test:ethereum": "scripts/ethereum/test -f \"$npm_config_fork\"",
+ "test:crawler": "scripts/crawler/test -f \"$npm_config_fork\" -n \"$npm_config_network\"",
"test:push": "scripts/actions/test -w push",
- "release": "release-it",
- "deploy:sample": "npm run deploy:sample --workspace @casimir/evm",
- "test:contracts": "npm run test:contracts --workspace @casimir/evm",
- "task:accounts": "npm run task:accounts --workspace @casimir/evm",
- "task:compile": "npm run task:compile --workspace @casimir/evm",
- "task:clean": "npm run task:clean --workspace @casimir/evm"
+ "release": "release-it"
},
"repository": {
"type": "git",
diff --git a/scripts/crawler/test b/scripts/crawler/test
new file mode 100755
index 000000000..6ab972553
--- /dev/null
+++ b/scripts/crawler/test
@@ -0,0 +1,82 @@
+#!/bin/bash
+# Test Casimir crawler with various network options
+#
+# Example:
+#
+# scripts/crawler/test -f -n
+#
+# Further information:
+# See https://hardhat.org/hardhat-network/docs/overview
+#
+
+# Set RPC URL bases
+ethereum_mainnet=https://eth-mainnet.g.alchemy.com/v2
+ethereum_testnet=https://eth-testnet.g.alchemy.com/v2
+
+# Get variables from root .env
+export $(xargs < .env)
+
+# Set default profile
+profile="consensus-networks-dev"
+
+if [ ${PROFILE+x} ]; then
+ echo "PROFILE is set to '$PROFILE'"
+ profile=$PROFILE
+else
+ export PROFILE="$profile"
+ echo "PROFILE is not set, using default profile '$PROFILE'"
+fi
+
+# Get args
+while getopts :f:n: flag
+do
+ case "${flag}" in
+ f) fork=${OPTARG};;
+ n) network=${OPTARG};;
+ esac
+done
+
+# Default to mainnet if fork is set vaguely
+if [ "$fork" = true ]; then
+ fork=mainnet
+fi
+
+# Default to mainnet if network is set vaguely
+if [ "$network" = true ]; then
+ network=mainnet
+fi
+
+commands=("npm run test --workspace @casimir/crawler")
+
+chains="ethereum"
+
+# Loop over comma-separated string of chains
+IFS=',' read -r -a chain_list <<< "$chains"
+
+for chain in "${chain_list[@]}"
+do
+ # Expose RPC URL directly if network is set to mainnet or testnet
+ if [ -n "$network" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-$chain-$network
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
+ --query SecretString \
+ --output text \
+ --profile $profile)
+
+ CHAIN=$(echo $chain | tr '[:lower:]' '[:upper:]')
+ rpc_base=${chain}_${network}
+ export "PUBLIC_${CHAIN}_RPC"="${!rpc_base}/$rpc_key"
+ else
+ # Pass fork or network to chain-specific script
+ commands+=("npm run dev:$chain --fork=$fork")
+ fi
+done
+
+for command in "${commands[@]}"
+do
+ $command &
+done
+
+wait && pkill -P $$
\ No newline at end of file
diff --git a/scripts/ethereum/dev b/scripts/ethereum/dev
index b1e620555..42edae20e 100755
--- a/scripts/ethereum/dev
+++ b/scripts/ethereum/dev
@@ -24,43 +24,45 @@ else
fi
# Get args
-while getopts f: flag
+while getopts :f: flag
do
case "${flag}" in
f) fork=${OPTARG};;
esac
done
-# Secret ID is just the name or ARN
-ledger_seed_secret_id=consensus-networks-ledger-seed
-echo "🤫 Getting $ledger_seed_secret_id for $profile"
+# Default to mainnet if fork is set vaguely
+if [ "$fork" = true ]; then
+ fork=mainnet
+fi
-# Get the secret from AWS
-ledger_seed=$(aws secretsmanager get-secret-value \
---secret-id $ledger_seed_secret_id \
+# Get the bip39 seed from AWS
+seed_secret_id=consensus-networks-bip39-seed
+seed=$(aws secretsmanager get-secret-value \
+--secret-id $seed_secret_id \
--query SecretString \
--output text \
--profile $profile)
-export LEDGER_SEED="$ledger_seed"
-
-if [ -z "$fork" ]; then
- echo "⛓ Running default localnode"
- npm run dev:localnode --workspace @casimir/evm
-else
- # Secret ID is just the name or ARN
- alchemy_secret_id=consensus-networks-alchemy-$fork
- echo "🤫 Getting $alchemy_secret_id for $profile"
+# Set the shared bip39 seed
+export BIP39_SEED="$seed"
+echo "Your mnemonic is $BIP39_SEED"
- # Get the secret from AWS
- alchemy_key=$(aws secretsmanager get-secret-value \
- --secret-id $alchemy_secret_id \
+if [ -n "$fork" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-ethereum-$fork
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
--query SecretString \
--output text \
--profile $profile)
- echo "⛓ Running $fork fork localnode"
- npm run dev:localnode --workspace @casimir/evm -- --fork https://eth-$fork.alchemyapi.io/v2/$alchemy_key
+ echo "⛓ Setting up ethereum chain with $fork fork"
+ export ETHEREUM_FORK_RPC="https://eth-$fork.g.alchemy.com/v2/$rpc_key"
+else
+ echo "⛓ Setting up ethereum chain without fork"
fi
+npm run dev:node --workspace @casimir/ethereum
+
diff --git a/scripts/ethereum/test b/scripts/ethereum/test
new file mode 100755
index 000000000..703a95d66
--- /dev/null
+++ b/scripts/ethereum/test
@@ -0,0 +1,70 @@
+#!/bin/bash
+# Test Ethereum contracts with Hardhat
+#
+# Example:
+#
+# scripts/ethereum/test -f
+#
+# Further information:
+# See https://hardhat.org/hardhat-network/docs/overview
+#
+
+# Set RPC URL bases
+ethereum_mainnet=https://eth-mainnet.g.alchemy.com/v2
+ethereum_testnet=https://eth-testnet.g.alchemy.com/v2
+
+# Get variables from root .env
+export $(xargs < .env)
+
+# Set default profile
+profile="consensus-networks-dev"
+
+if [ ${PROFILE+x} ]; then
+ echo "PROFILE is set to '$PROFILE'"
+ profile=$PROFILE
+else
+ export PROFILE="$profile"
+ echo "PROFILE is not set, using default profile '$PROFILE'"
+fi
+
+# Get args
+while getopts :f: flag
+do
+ case "${flag}" in
+ f) fork=${OPTARG};;
+ esac
+done
+
+# Default to mainnet if fork is set vaguely
+if [ "$fork" = true ]; then
+ fork=mainnet
+fi
+
+# Get the bip39 seed from AWS
+seed_secret_id=consensus-networks-bip39-seed
+seed=$(aws secretsmanager get-secret-value \
+--secret-id $seed_secret_id \
+--query SecretString \
+--output text \
+--profile $profile)
+
+# Set the shared bip39 seed
+export BIP39_SEED="$seed"
+echo "Your mnemonic is $BIP39_SEED"
+
+if [ -n "$fork" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-ethereum-$fork
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
+ --query SecretString \
+ --output text \
+ --profile $profile)
+
+ echo "⛓ Testing ethereum contracts with $fork fork"
+ export ETHEREUM_FORK_RPC="https://eth-$fork.g.alchemy.com/v2/$rpc_key"
+else
+ echo "⛓ Testing ethereum contracts without fork"
+fi
+
+npm run test:contracts --workspace @casimir/ethereum
\ No newline at end of file
diff --git a/scripts/local/dev b/scripts/local/dev
index a8c729473..b136a6f8e 100755
--- a/scripts/local/dev
+++ b/scripts/local/dev
@@ -1,5 +1,5 @@
#!/bin/bash
-# Run an application dev server
+# Run a Casimir dev server
#
# Example:
#
@@ -11,30 +11,85 @@
# Configure and expose variables
source scripts/aws/configure
+
+# Set RPC URL bases
+ethereum_mainnet=https://eth-mainnet.g.alchemy.com/v2
+ethereum_testnet=https://eth-testnet.g.alchemy.com/v2
+
+# Set the stage
export PUBLIC_STAGE=${STAGE}
# Get args
-while getopts :a:m:s: flag
+while getopts :a:f:m:n:s:t: flag
do
case "${flag}" in
a) app=${OPTARG};;
+ f) fork=${OPTARG};;
m) mock=${OPTARG};;
+ n) network=${OPTARG};;
s) speculos=${OPTARG};;
+ t) tunnel=${OPTARG};;
esac
done
+# Default to mainnet if fork is set vaguely
+if [ "$fork" = true ]; then
+ fork=mainnet
+fi
+
+# Default to mainnet if network is set vaguely
+if [ "$network" = true ]; then
+ network=mainnet
+fi
+
+commands=()
+
if [ "$app" == "landing" ]; then
services="users"
else
# Default app
app="web"
+ chains="ethereum"
services=""
+
+ # Loop over comma-separated string of chains
+ IFS=',' read -r -a chain_list <<< "$chains"
+
+ for chain in "${chain_list[@]}"
+ do
+ # Expose RPC URL directly if network is set to mainnet or testnet
+ if [ -n "$network" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-$chain-$network
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
+ --query SecretString \
+ --output text \
+ --profile $profile)
+
+ CHAIN=$(echo $chain | tr '[:lower:]' '[:upper:]')
+ rpc_base=${chain}_${network}
+ export "PUBLIC_${CHAIN}_RPC"="${!rpc_base}/$rpc_key"
+ else
+ # Pass fork or network to chain-specific script
+ commands+=("npm run dev:$chain --fork=$fork")
+ fi
+ done
+
+ # Set project-wide contracts for local (default) chain
+ if [ -z "$network" ]; then
+ export PUBLIC_SSV_ADDRESS="0x967Ada0ed736FC6916dABe7f0193BAb811C74f50"
+
+ # Tunnel local (default) chain networks if specified
+ if [ -n "$tunnel" ]; then
+ export LOCAL_TUNNEL="$tunnel"
+ fi
+ fi
fi
-commands=("npm run dev --workspace @casimir/$app")
+commands+=("npm run dev --workspace @casimir/$app")
if [ -n "$mock" ]; then
-
# Loop over comma-separated string of services
IFS=',' read -r -a service_list <<< "$services"
port=3999
From 623530a662ab5d109a7d758b578b00727675d137 Mon Sep 17 00:00:00 2001
From: Shane Earley
Date: Wed, 5 Oct 2022 18:28:16 -0400
Subject: [PATCH 18/40] Reset package-lock
---
package-lock.json | 1684 +++++----------------------------------------
1 file changed, 177 insertions(+), 1507 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 026f2a23b..253a3d732 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -80,8 +80,6 @@
},
"apps/web/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",
@@ -96,6 +94,7 @@
"url": "https://feross.org/support"
}
],
+ "license": "MIT",
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
@@ -119,10 +118,9 @@
},
"common/data/node_modules/esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
@@ -156,12 +154,11 @@
},
"common/data/node_modules/esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -185,10 +182,9 @@
},
"common/helpers/node_modules/esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
@@ -222,12 +218,11 @@
},
"common/helpers/node_modules/esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -243,8 +238,8 @@
"@ledgerhq/hw-transport": "^6.27.2"
}
},
- "contracts/evm": {
- "name": "@casimir/evm",
+ "contracts/ethereum": {
+ "name": "@casimir/ethereum",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-waffle": "^2.0.3",
@@ -262,7 +257,7 @@
"typechain": "^8.1.0"
}
},
- "contracts/evm/node_modules/@types/node": {
+ "contracts/ethereum/node_modules/@types/node": {
"version": "17.0.45",
"dev": true,
"license": "MIT"
@@ -2635,8 +2630,8 @@
"resolved": "common/data",
"link": true
},
- "node_modules/@casimir/evm": {
- "resolved": "contracts/evm",
+ "node_modules/@casimir/ethereum": {
+ "resolved": "contracts/ethereum",
"link": true
},
"node_modules/@casimir/helpers": {
@@ -3059,38 +3054,6 @@
"esbuild": "*"
}
},
- "node_modules/@esbuild/android-arm": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz",
- "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz",
- "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/@eslint/eslintrc": {
"version": "1.3.0",
"dev": true,
@@ -3403,8 +3366,6 @@
},
"node_modules/@ethersproject/abi": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz",
- "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==",
"funding": [
{
"type": "individual",
@@ -3415,6 +3376,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
@@ -3429,8 +3391,6 @@
},
"node_modules/@ethersproject/abstract-provider": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz",
- "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==",
"funding": [
{
"type": "individual",
@@ -3441,6 +3401,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -3453,8 +3414,6 @@
},
"node_modules/@ethersproject/abstract-signer": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz",
- "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==",
"funding": [
{
"type": "individual",
@@ -3465,6 +3424,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
@@ -3475,8 +3435,6 @@
},
"node_modules/@ethersproject/address": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz",
- "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==",
"funding": [
{
"type": "individual",
@@ -3487,6 +3445,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -3497,8 +3456,6 @@
},
"node_modules/@ethersproject/base64": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz",
- "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==",
"funding": [
{
"type": "individual",
@@ -3509,14 +3466,13 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0"
}
},
"node_modules/@ethersproject/basex": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz",
- "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==",
"funding": [
{
"type": "individual",
@@ -3527,6 +3483,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/properties": "^5.7.0"
@@ -3534,8 +3491,6 @@
},
"node_modules/@ethersproject/bignumber": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz",
- "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==",
"funding": [
{
"type": "individual",
@@ -3546,6 +3501,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
@@ -3554,8 +3510,6 @@
},
"node_modules/@ethersproject/bytes": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz",
- "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==",
"funding": [
{
"type": "individual",
@@ -3566,14 +3520,13 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/logger": "^5.7.0"
}
},
"node_modules/@ethersproject/constants": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz",
- "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==",
"funding": [
{
"type": "individual",
@@ -3584,14 +3537,13 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bignumber": "^5.7.0"
}
},
"node_modules/@ethersproject/contracts": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz",
- "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==",
"funding": [
{
"type": "individual",
@@ -3602,6 +3554,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/abstract-provider": "^5.7.0",
@@ -3617,8 +3570,6 @@
},
"node_modules/@ethersproject/hash": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz",
- "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==",
"funding": [
{
"type": "individual",
@@ -3629,6 +3580,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/address": "^5.7.0",
@@ -3643,8 +3595,6 @@
},
"node_modules/@ethersproject/hdnode": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz",
- "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==",
"funding": [
{
"type": "individual",
@@ -3655,6 +3605,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/basex": "^5.7.0",
@@ -3672,8 +3623,6 @@
},
"node_modules/@ethersproject/json-wallets": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz",
- "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==",
"funding": [
{
"type": "individual",
@@ -3684,6 +3633,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/address": "^5.7.0",
@@ -3702,8 +3652,6 @@
},
"node_modules/@ethersproject/keccak256": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz",
- "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==",
"funding": [
{
"type": "individual",
@@ -3714,6 +3662,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"js-sha3": "0.8.0"
@@ -3721,8 +3670,6 @@
},
"node_modules/@ethersproject/logger": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz",
- "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==",
"funding": [
{
"type": "individual",
@@ -3732,12 +3679,11 @@
"type": "individual",
"url": "https://www.buymeacoffee.com/ricmoo"
}
- ]
+ ],
+ "license": "MIT"
},
"node_modules/@ethersproject/networks": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz",
- "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==",
"funding": [
{
"type": "individual",
@@ -3748,14 +3694,13 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/logger": "^5.7.0"
}
},
"node_modules/@ethersproject/pbkdf2": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz",
- "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==",
"funding": [
{
"type": "individual",
@@ -3766,6 +3711,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/sha2": "^5.7.0"
@@ -3773,8 +3719,6 @@
},
"node_modules/@ethersproject/properties": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz",
- "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==",
"funding": [
{
"type": "individual",
@@ -3785,14 +3729,13 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/logger": "^5.7.0"
}
},
"node_modules/@ethersproject/providers": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.1.tgz",
- "integrity": "sha512-vZveG/DLyo+wk4Ga1yx6jSEHrLPgmTt+dFv0dv8URpVCRf0jVhalps1jq/emN/oXnMRsC7cQgAF32DcXLL7BPQ==",
"funding": [
{
"type": "individual",
@@ -3803,6 +3746,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
@@ -3851,8 +3795,6 @@
},
"node_modules/@ethersproject/random": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz",
- "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==",
"funding": [
{
"type": "individual",
@@ -3863,6 +3805,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0"
@@ -3870,8 +3813,6 @@
},
"node_modules/@ethersproject/rlp": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz",
- "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==",
"funding": [
{
"type": "individual",
@@ -3882,6 +3823,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0"
@@ -3889,8 +3831,6 @@
},
"node_modules/@ethersproject/sha2": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz",
- "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==",
"funding": [
{
"type": "individual",
@@ -3901,6 +3841,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
@@ -3909,8 +3850,6 @@
},
"node_modules/@ethersproject/signing-key": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz",
- "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==",
"funding": [
{
"type": "individual",
@@ -3921,6 +3860,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
@@ -3932,8 +3872,7 @@
},
"node_modules/@ethersproject/signing-key/node_modules/elliptic": {
"version": "6.5.4",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
- "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
+ "license": "MIT",
"dependencies": {
"bn.js": "^4.11.9",
"brorand": "^1.1.0",
@@ -3946,13 +3885,10 @@
},
"node_modules/@ethersproject/signing-key/node_modules/elliptic/node_modules/bn.js": {
"version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
+ "license": "MIT"
},
"node_modules/@ethersproject/solidity": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz",
- "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==",
"funding": [
{
"type": "individual",
@@ -3963,6 +3899,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -3974,8 +3911,6 @@
},
"node_modules/@ethersproject/strings": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz",
- "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==",
"funding": [
{
"type": "individual",
@@ -3986,6 +3921,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
@@ -3994,8 +3930,6 @@
},
"node_modules/@ethersproject/transactions": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz",
- "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==",
"funding": [
{
"type": "individual",
@@ -4006,6 +3940,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
@@ -4020,8 +3955,6 @@
},
"node_modules/@ethersproject/units": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz",
- "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==",
"funding": [
{
"type": "individual",
@@ -4032,6 +3965,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
@@ -4040,8 +3974,6 @@
},
"node_modules/@ethersproject/wallet": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz",
- "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==",
"funding": [
{
"type": "individual",
@@ -4052,6 +3984,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
@@ -4072,8 +4005,6 @@
},
"node_modules/@ethersproject/web": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz",
- "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==",
"funding": [
{
"type": "individual",
@@ -4084,6 +4015,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/base64": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -4094,8 +4026,6 @@
},
"node_modules/@ethersproject/wordlists": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz",
- "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==",
"funding": [
{
"type": "individual",
@@ -4106,6 +4036,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/hash": "^5.7.0",
@@ -5263,16 +5194,14 @@
},
"node_modules/@ledgerhq/cryptoassets": {
"version": "6.34.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/cryptoassets/-/cryptoassets-6.34.0.tgz",
- "integrity": "sha512-Rg3i3aOWnTFD8mtNZetZnG+7XTAWu2iuD4jCC6oUeU5wKB7Sc5m0En7LoEmEWv7ZW5VpH8NjM6uK/KWgsCwR6Q==",
+ "license": "Apache-2.0",
"dependencies": {
"invariant": "2"
}
},
"node_modules/@ledgerhq/devices": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.0.tgz",
- "integrity": "sha512-vq4B33WdU0dRAJIRFWZMj6w1W1yw1i4mekCmhk7N9wPaFrtGWZ2iI9WDihsNOBooCWKQe8Jsb9eD8RVThbSlFQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@ledgerhq/errors": "^6.10.1",
"@ledgerhq/logs": "^6.10.0",
@@ -5282,8 +5211,7 @@
},
"node_modules/@ledgerhq/devices/node_modules/lru-cache": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "license": "ISC",
"dependencies": {
"yallist": "^4.0.0"
},
@@ -5293,8 +5221,7 @@
},
"node_modules/@ledgerhq/devices/node_modules/rxjs": {
"version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "license": "Apache-2.0",
"dependencies": {
"tslib": "^1.9.0"
},
@@ -5304,8 +5231,7 @@
},
"node_modules/@ledgerhq/devices/node_modules/semver": {
"version": "7.3.7",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
- "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "license": "ISC",
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -5318,23 +5244,19 @@
},
"node_modules/@ledgerhq/devices/node_modules/tslib": {
"version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+ "license": "0BSD"
},
"node_modules/@ledgerhq/devices/node_modules/yallist": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ "license": "ISC"
},
"node_modules/@ledgerhq/errors": {
"version": "6.10.1",
- "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.1.tgz",
- "integrity": "sha512-92d1zRQleR1AQ4CAXgWgDtKUms+8EwShLVUcajI+BLWvgJ1Vclmq6PsBIDEQbsm+riVu/Ji3LcHdmgFgmi0VGw=="
+ "license": "Apache-2.0"
},
"node_modules/@ledgerhq/hw-app-eth": {
"version": "6.29.6",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-eth/-/hw-app-eth-6.29.6.tgz",
- "integrity": "sha512-7TS6dTF30ONOqppk0J8YYVX0Cd7/Pt0Uuy77n/LRXpfsLHDABSaRROjNzxxT3q7EIMz6FQi4K4WaN8OIznkytA==",
+ "license": "Apache-2.0",
"dependencies": {
"@ethersproject/abi": "^5.5.0",
"@ethersproject/rlp": "^5.5.0",
@@ -5349,16 +5271,14 @@
},
"node_modules/@ledgerhq/hw-app-eth/node_modules/bignumber.js": {
"version": "9.1.0",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz",
- "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==",
+ "license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/@ledgerhq/hw-transport": {
"version": "6.27.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.3.tgz",
- "integrity": "sha512-vQMNCC1DUDtS+nkJsbycgFMSodmj91WuGSxX7RjOz2vuZBc6jXtDn9jzYdsfyKOwnvalQAkXm9hWWHlrMIKdNQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@ledgerhq/devices": "^7.0.0",
"@ledgerhq/errors": "^6.10.1",
@@ -5367,8 +5287,7 @@
},
"node_modules/@ledgerhq/hw-transport-mocker": {
"version": "6.27.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-mocker/-/hw-transport-mocker-6.27.3.tgz",
- "integrity": "sha512-eweiIdbU+ZC4txin7JhLQpQ5dpMoPyyGo3O5OvD4xsZGbVNauEPYZzUks0ko5ZniCpVnB3qNfS3cU3PXdjN6Zw==",
+ "license": "Apache-2.0",
"dependencies": {
"@ledgerhq/hw-transport": "^6.27.3",
"@ledgerhq/logs": "^6.10.1-nightly.0"
@@ -5376,13 +5295,11 @@
},
"node_modules/@ledgerhq/hw-transport-mocker/node_modules/@ledgerhq/logs": {
"version": "6.10.1-nightly.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.1-nightly.0.tgz",
- "integrity": "sha512-hwoUwlC7le37kQ72W8hAzVq070zuY6IEpssYNXDTr3pEfc3cprTAgEnaBsb0jXQGiLdONPvxc7nPp8nSyGD3hQ=="
+ "license": "Apache-2.0"
},
"node_modules/@ledgerhq/hw-transport-webhid": {
"version": "6.27.2",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.2.tgz",
- "integrity": "sha512-ZlyNheUhcxBZqjJzhSfJfeGQvNbeyWs9866rdQjVeG1zsbTJi0+6tfRv8J248QISS8vHtG5IMSxgMg9mtux9dQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@ledgerhq/devices": "^7.0.0",
"@ledgerhq/errors": "^6.10.1",
@@ -5392,8 +5309,7 @@
},
"node_modules/@ledgerhq/logs": {
"version": "6.10.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz",
- "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw=="
+ "license": "Apache-2.0"
},
"node_modules/@mapbox/node-pre-gyp": {
"version": "1.0.9",
@@ -5772,9 +5688,8 @@
},
"node_modules/@rollup/plugin-inject": {
"version": "4.0.4",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz",
- "integrity": "sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@rollup/pluginutils": "^3.1.0",
"estree-walker": "^2.0.1",
@@ -5786,15 +5701,13 @@
},
"node_modules/@rollup/plugin-inject/node_modules/estree-walker": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@rollup/pluginutils": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
- "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/estree": "0.0.39",
"estree-walker": "^1.0.1",
@@ -5809,9 +5722,8 @@
},
"node_modules/@rollup/pluginutils/node_modules/estree-walker": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
- "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@scure/base": {
"version": "1.1.1",
@@ -6216,9 +6128,8 @@
},
"node_modules/@types/estree": {
"version": "0.0.39",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
- "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/ethereumjs-abi": {
"version": "0.6.3",
@@ -6271,9 +6182,8 @@
},
"node_modules/@types/http-proxy": {
"version": "1.17.9",
- "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz",
- "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/node": "*"
}
@@ -6340,9 +6250,8 @@
},
"node_modules/@types/localtunnel": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/localtunnel/-/localtunnel-2.0.1.tgz",
- "integrity": "sha512-0h/ggh+tp9uKHc2eEOLdMgWW0cNwsQfn6iEE1Y44FszNB4BQyL5N6xvd5BnChZksB0YgVqa5MKxJt0dFoOKRxw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/node": "*"
}
@@ -7093,8 +7002,7 @@
},
"node_modules/@walletconnect/browser-utils": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/browser-utils/-/browser-utils-1.8.0.tgz",
- "integrity": "sha512-Wcqqx+wjxIo9fv6eBUFHPsW1y/bGWWRboni5dfD8PtOmrihrEpOCmvRJe4rfl7xgJW8Ea9UqKEaq0bIRLHlK4A==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/safe-json": "1.0.0",
"@walletconnect/types": "^1.8.0",
@@ -7105,8 +7013,7 @@
},
"node_modules/@walletconnect/client": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/client/-/client-1.8.0.tgz",
- "integrity": "sha512-svyBQ14NHx6Cs2j4TpkQaBI/2AF4+LXz64FojTjMtV4VMMhl81jSO1vNeg+yYhQzvjcGH/GpSwixjyCW0xFBOQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/core": "^1.8.0",
"@walletconnect/iso-crypto": "^1.8.0",
@@ -7116,8 +7023,7 @@
},
"node_modules/@walletconnect/core": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-1.8.0.tgz",
- "integrity": "sha512-aFTHvEEbXcZ8XdWBw6rpQDte41Rxwnuk3SgTD8/iKGSRTni50gI9S3YEzMj05jozSiOBxQci4pJDMVhIUMtarw==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/socket-transport": "^1.8.0",
"@walletconnect/types": "^1.8.0",
@@ -7126,8 +7032,7 @@
},
"node_modules/@walletconnect/crypto": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@walletconnect/crypto/-/crypto-1.0.2.tgz",
- "integrity": "sha512-+OlNtwieUqVcOpFTvLBvH+9J9pntEqH5evpINHfVxff1XIgwV55PpbdvkHu6r9Ib4WQDOFiD8OeeXs1vHw7xKQ==",
+ "license": "MIT",
"dependencies": {
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/environment": "^1.0.0",
@@ -7138,13 +7043,11 @@
},
"node_modules/@walletconnect/crypto/node_modules/aes-js": {
"version": "3.1.2",
- "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz",
- "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ=="
+ "license": "MIT"
},
"node_modules/@walletconnect/encoding": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@walletconnect/encoding/-/encoding-1.0.1.tgz",
- "integrity": "sha512-8opL2rs6N6E3tJfsqwS82aZQDL3gmupWUgmvuZ3CGU7z/InZs3R9jkzH8wmYtpbq0sFK3WkJkQRZFFk4BkrmFA==",
+ "license": "MIT",
"dependencies": {
"is-typedarray": "1.0.0",
"typedarray-to-buffer": "3.1.5"
@@ -7152,13 +7055,11 @@
},
"node_modules/@walletconnect/environment": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.0.tgz",
- "integrity": "sha512-4BwqyWy6KpSvkocSaV7WR3BlZfrxLbJSLkg+j7Gl6pTDE+U55lLhJvQaMuDVazXYxcjBsG09k7UlH7cGiUI5vQ=="
+ "license": "MIT"
},
"node_modules/@walletconnect/iso-crypto": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/iso-crypto/-/iso-crypto-1.8.0.tgz",
- "integrity": "sha512-pWy19KCyitpfXb70hA73r9FcvklS+FvO9QUIttp3c2mfW8frxgYeRXfxLRCIQTkaYueRKvdqPjbyhPLam508XQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/crypto": "^1.0.2",
"@walletconnect/types": "^1.8.0",
@@ -7167,16 +7068,14 @@
},
"node_modules/@walletconnect/jsonrpc-types": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.1.tgz",
- "integrity": "sha512-+6coTtOuChCqM+AoYyi4Q83p9l/laI6NvuM2/AHaZFuf0gT0NjW7IX2+86qGyizn7Ptq4AYZmfxurAxTnhefuw==",
+ "license": "MIT",
"dependencies": {
"keyvaluestorage-interface": "^1.0.0"
}
},
"node_modules/@walletconnect/jsonrpc-utils": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.3.tgz",
- "integrity": "sha512-3yb49bPk16MNLk6uIIHPSHQCpD6UAo1OMOx1rM8cW/MPEAYAzrSW5hkhG7NEUwX9SokRIgnZK3QuQkiyNzBMhQ==",
+ "license": "MIT",
"dependencies": {
"@walletconnect/environment": "^1.0.0",
"@walletconnect/jsonrpc-types": "^1.0.1"
@@ -7184,14 +7083,11 @@
},
"node_modules/@walletconnect/mobile-registry": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz",
- "integrity": "sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw==",
- "deprecated": "Deprecated in favor of dynamic registry available from: https://github.com/walletconnect/walletconnect-registry"
+ "license": "MIT"
},
"node_modules/@walletconnect/qrcode-modal": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/qrcode-modal/-/qrcode-modal-1.8.0.tgz",
- "integrity": "sha512-BueaFefaAi8mawE45eUtztg3ZFbsAH4DDXh1UNwdUlsvFMjqcYzLUG0xZvDd6z2eOpbgDg2N3bl6gF0KONj1dg==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/browser-utils": "^1.8.0",
"@walletconnect/mobile-registry": "^1.4.0",
@@ -7203,8 +7099,7 @@
},
"node_modules/@walletconnect/randombytes": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@walletconnect/randombytes/-/randombytes-1.0.2.tgz",
- "integrity": "sha512-ivgOtAyqQnN0rLQmOFPemsgYGysd/ooLfaDA/ACQ3cyqlca56t3rZc7pXfqJOIETx/wSyoF5XbwL+BqYodw27A==",
+ "license": "MIT",
"dependencies": {
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/environment": "^1.0.0",
@@ -7213,13 +7108,11 @@
},
"node_modules/@walletconnect/safe-json": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.0.tgz",
- "integrity": "sha512-QJzp/S/86sUAgWY6eh5MKYmSfZaRpIlmCJdi5uG4DJlKkZrHEF7ye7gA+VtbVzvTtpM/gRwO2plQuiooIeXjfg=="
+ "license": "MIT"
},
"node_modules/@walletconnect/socket-transport": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/socket-transport/-/socket-transport-1.8.0.tgz",
- "integrity": "sha512-5DyIyWrzHXTcVp0Vd93zJ5XMW61iDM6bcWT4p8DTRfFsOtW46JquruMhxOLeCOieM4D73kcr3U7WtyR4JUsGuQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/types": "^1.8.0",
"@walletconnect/utils": "^1.8.0",
@@ -7228,8 +7121,7 @@
},
"node_modules/@walletconnect/socket-transport/node_modules/ws": {
"version": "7.5.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz",
- "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==",
+ "license": "MIT",
"engines": {
"node": ">=8.3.0"
},
@@ -7248,13 +7140,11 @@
},
"node_modules/@walletconnect/types": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-1.8.0.tgz",
- "integrity": "sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg=="
+ "license": "Apache-2.0"
},
"node_modules/@walletconnect/utils": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-1.8.0.tgz",
- "integrity": "sha512-zExzp8Mj1YiAIBfKNm5u622oNw44WOESzo6hj+Q3apSMIb0Jph9X3GDIdbZmvVZsNPxWDL7uodKgZcCInZv2vA==",
+ "license": "Apache-2.0",
"dependencies": {
"@walletconnect/browser-utils": "^1.8.0",
"@walletconnect/encoding": "^1.0.1",
@@ -7267,13 +7157,11 @@
},
"node_modules/@walletconnect/utils/node_modules/bn.js": {
"version": "4.11.8",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
- "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
+ "license": "MIT"
},
"node_modules/@walletconnect/utils/node_modules/query-string": {
"version": "6.13.5",
- "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.5.tgz",
- "integrity": "sha512-svk3xg9qHR39P3JlHuD7g3nRnyay5mHbrPctEBDUxUkHRifPHXJDhBUycdCC0NBjXoDf44Gb+IsOZL1Uwn8M/Q==",
+ "license": "MIT",
"dependencies": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
@@ -7288,13 +7176,11 @@
},
"node_modules/@walletconnect/window-getters": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.0.tgz",
- "integrity": "sha512-xB0SQsLaleIYIkSsl43vm8EwETpBzJ2gnzk7e0wMF3ktqiTGS6TFHxcprMl5R44KKh4tCcHCJwolMCaDSwtAaA=="
+ "license": "MIT"
},
"node_modules/@walletconnect/window-metadata": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.0.tgz",
- "integrity": "sha512-9eFvmJxIKCC3YWOL97SgRkKhlyGXkrHwamfechmqszbypFspaSk+t2jQXAEU7YClHF6Qjw5eYOmy1//zFi9/GA==",
+ "license": "MIT",
"dependencies": {
"@walletconnect/window-getters": "^1.0.0"
}
@@ -7428,8 +7314,7 @@
},
"node_modules/aes-js": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
- "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw=="
+ "license": "MIT"
},
"node_modules/agent-base": {
"version": "6.0.2",
@@ -8082,8 +7967,7 @@
},
"node_modules/axios": {
"version": "0.26.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
- "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
+ "license": "MIT",
"dependencies": {
"follow-redirects": "^1.14.8"
}
@@ -8607,8 +8491,7 @@
},
"node_modules/buffer-alloc": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
- "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
+ "license": "MIT",
"dependencies": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
@@ -8616,13 +8499,11 @@
},
"node_modules/buffer-alloc-unsafe": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
- "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
+ "license": "MIT"
},
"node_modules/buffer-fill": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
- "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
+ "license": "MIT"
},
"node_modules/buffer-from": {
"version": "1.1.2",
@@ -10196,8 +10077,7 @@
},
"node_modules/copy-to-clipboard": {
"version": "3.3.2",
- "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz",
- "integrity": "sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==",
+ "license": "MIT",
"dependencies": {
"toggle-selection": "^1.0.6"
}
@@ -10940,8 +10820,7 @@
},
"node_modules/detect-browser": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.0.tgz",
- "integrity": "sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA=="
+ "license": "MIT"
},
"node_modules/detect-indent": {
"version": "5.0.0",
@@ -11005,8 +10884,7 @@
},
"node_modules/dijkstrajs": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz",
- "integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg=="
+ "license": "MIT"
},
"node_modules/dir-glob": {
"version": "3.0.1",
@@ -11401,38 +11279,6 @@
"esbuild-windows-arm64": "0.14.54"
}
},
- "node_modules/esbuild-android-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz",
- "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-android-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz",
- "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/esbuild-darwin-64": {
"version": "0.14.54",
"cpu": [
@@ -11448,598 +11294,6 @@
"node": ">=12"
}
},
- "node_modules/esbuild-darwin-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz",
- "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-freebsd-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz",
- "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-freebsd-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz",
- "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-32": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz",
- "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz",
- "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-arm": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz",
- "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz",
- "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-mips64le": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz",
- "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-ppc64le": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz",
- "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-riscv64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz",
- "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-s390x": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz",
- "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-netbsd-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz",
- "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-openbsd-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz",
- "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-sunos-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz",
- "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-32": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz",
- "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz",
- "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz",
- "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-loong64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
- "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-android-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
- "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-android-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
- "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-darwin-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
- "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-freebsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
- "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-freebsd-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
- "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
- "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
- "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-arm": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
- "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
- "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-mips64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
- "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-ppc64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
- "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-riscv64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
- "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-linux-s390x": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
- "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-netbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
- "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-openbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
- "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-sunos-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
- "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-windows-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
- "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-windows-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
- "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild/node_modules/esbuild-windows-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
- "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/escalade": {
"version": "3.1.1",
"license": "MIT",
@@ -12980,8 +12234,6 @@
},
"node_modules/ethers": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.1.tgz",
- "integrity": "sha512-5krze4dRLITX7FpU8J4WscXqADiKmyeNlylmmDLbS95DaZpBhDe2YSwRQwKXWNyXcox7a3gBgm/MkGXV1O1S/Q==",
"funding": [
{
"type": "individual",
@@ -12992,6 +12244,7 @@
"url": "https://www.buymeacoffee.com/ricmoo"
}
],
+ "license": "MIT",
"dependencies": {
"@ethersproject/abi": "5.7.0",
"@ethersproject/abstract-provider": "5.7.0",
@@ -13064,9 +12317,8 @@
},
"node_modules/eventemitter3": {
"version": "4.0.7",
- "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
- "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/events": {
"version": "3.3.0",
@@ -19000,7 +18252,7 @@
},
"node_modules/ganache-core/node_modules/keccak": {
"version": "3.0.1",
- "dev": true,
+ "extraneous": true,
"hasInstallScript": true,
"inBundle": true,
"license": "MIT",
@@ -19562,7 +18814,7 @@
},
"node_modules/ganache-core/node_modules/node-addon-api": {
"version": "2.0.2",
- "dev": true,
+ "extraneous": true,
"inBundle": true,
"license": "MIT"
},
@@ -19576,7 +18828,7 @@
},
"node_modules/ganache-core/node_modules/node-gyp-build": {
"version": "4.2.3",
- "dev": true,
+ "extraneous": true,
"inBundle": true,
"license": "MIT",
"bin": {
@@ -24577,9 +23829,8 @@
},
"node_modules/http-proxy": {
"version": "1.18.1",
- "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
- "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0",
@@ -24604,9 +23855,8 @@
},
"node_modules/http-proxy-middleware": {
"version": "2.0.6",
- "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
- "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/http-proxy": "^1.17.8",
"http-proxy": "^1.18.1",
@@ -24628,9 +23878,8 @@
},
"node_modules/http-proxy-middleware/node_modules/is-plain-obj": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
- "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=10"
},
@@ -24971,8 +24220,7 @@
},
"node_modules/invariant": {
"version": "2.2.4",
- "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
- "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+ "license": "MIT",
"dependencies": {
"loose-envify": "^1.0.0"
}
@@ -28288,8 +27536,7 @@
},
"node_modules/keyvaluestorage-interface": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz",
- "integrity": "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g=="
+ "license": "MIT"
},
"node_modules/kind-of": {
"version": "6.0.3",
@@ -28795,9 +28042,8 @@
},
"node_modules/localtunnel": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz",
- "integrity": "sha512-n418Cn5ynvJd7m/N1d9WVJISLJF/ellZnfsLnx8WBWGzxv/ntNcFkJ1o6se5quUhCplfLGBNL5tYHiq5WF3Nug==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"axios": "0.21.4",
"debug": "4.3.2",
@@ -28813,18 +28059,16 @@
},
"node_modules/localtunnel/node_modules/axios": {
"version": "0.21.4",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
- "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"follow-redirects": "^1.14.0"
}
},
"node_modules/localtunnel/node_modules/debug": {
"version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ms": "2.1.2"
},
@@ -28839,24 +28083,21 @@
},
"node_modules/localtunnel/node_modules/emoji-regex": {
"version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/localtunnel/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/localtunnel/node_modules/string-width": {
"version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -28868,18 +28109,16 @@
},
"node_modules/localtunnel/node_modules/y18n": {
"version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
+ "license": "ISC",
"engines": {
"node": ">=10"
}
},
"node_modules/localtunnel/node_modules/yargs": {
"version": "17.1.1",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz",
- "integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
@@ -30510,9 +29749,8 @@
},
"node_modules/openurl": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz",
- "integrity": "sha512-d/gTkTb1i1GKz5k3XE3XFV/PxQ1k45zDqGP2OA7YhgsaLoqm6qRvARAZOFer1fcXritWlGBRCu/UgeS4HAnXAA==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/optionator": {
"version": "0.9.1",
@@ -31323,8 +30561,7 @@
},
"node_modules/pngjs": {
"version": "3.4.0",
- "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
- "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
+ "license": "MIT",
"engines": {
"node": ">=4.0.0"
}
@@ -31482,8 +30719,7 @@
},
"node_modules/preact": {
"version": "10.4.1",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.4.1.tgz",
- "integrity": "sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==",
+ "license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
@@ -31670,8 +30906,7 @@
},
"node_modules/qrcode": {
"version": "1.4.4",
- "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz",
- "integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==",
+ "license": "MIT",
"dependencies": {
"buffer": "^5.4.3",
"buffer-alloc": "^1.2.0",
@@ -31690,16 +30925,14 @@
},
"node_modules/qrcode/node_modules/ansi-regex": {
"version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/qrcode/node_modules/cliui": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
- "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+ "license": "ISC",
"dependencies": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
@@ -31708,13 +30941,11 @@
},
"node_modules/qrcode/node_modules/emoji-regex": {
"version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
+ "license": "MIT"
},
"node_modules/qrcode/node_modules/find-up": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "license": "MIT",
"dependencies": {
"locate-path": "^3.0.0"
},
@@ -31724,16 +30955,14 @@
},
"node_modules/qrcode/node_modules/is-fullwidth-code-point": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/qrcode/node_modules/locate-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "license": "MIT",
"dependencies": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -31744,8 +30973,7 @@
},
"node_modules/qrcode/node_modules/p-limit": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "license": "MIT",
"dependencies": {
"p-try": "^2.0.0"
},
@@ -31758,8 +30986,7 @@
},
"node_modules/qrcode/node_modules/p-locate": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "license": "MIT",
"dependencies": {
"p-limit": "^2.0.0"
},
@@ -31769,16 +30996,14 @@
},
"node_modules/qrcode/node_modules/path-exists": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
+ "license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/qrcode/node_modules/string-width": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "license": "MIT",
"dependencies": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
@@ -31790,8 +31015,7 @@
},
"node_modules/qrcode/node_modules/strip-ansi": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "license": "MIT",
"dependencies": {
"ansi-regex": "^4.1.0"
},
@@ -31801,8 +31025,7 @@
},
"node_modules/qrcode/node_modules/wrap-ansi": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
- "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
@@ -31814,8 +31037,7 @@
},
"node_modules/qrcode/node_modules/yargs": {
"version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
+ "license": "MIT",
"dependencies": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
@@ -31831,8 +31053,7 @@
},
"node_modules/qrcode/node_modules/yargs-parser": {
"version": "13.1.2",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
- "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+ "license": "ISC",
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
@@ -32691,9 +31912,8 @@
},
"node_modules/requires-port": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
- "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/resolve": {
"version": "1.17.0",
@@ -34968,8 +34188,7 @@
},
"node_modules/toggle-selection": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
- "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
+ "license": "MIT"
},
"node_modules/toidentifier": {
"version": "1.0.1",
@@ -38068,10 +37287,9 @@
},
"services/crawler/node_modules/esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
@@ -38105,12 +37323,11 @@
},
"services/crawler/node_modules/esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -38910,10 +38127,9 @@
},
"services/users/node_modules/esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
@@ -38947,12 +38163,11 @@
},
"services/users/node_modules/esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -40942,8 +40157,6 @@
},
"esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"requires": {
"@esbuild/android-arm": "0.15.9",
@@ -40972,8 +40185,6 @@
},
"esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"dev": true,
"optional": true
},
@@ -41504,8 +40715,6 @@
},
"esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"requires": {
"@esbuild/android-arm": "0.15.9",
@@ -41534,15 +40743,13 @@
},
"esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"dev": true,
"optional": true
}
}
},
- "@casimir/evm": {
- "version": "file:contracts/evm",
+ "@casimir/ethereum": {
+ "version": "file:contracts/ethereum",
"requires": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-waffle": "^2.0.3",
@@ -41580,8 +40787,6 @@
},
"esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"requires": {
"@esbuild/android-arm": "0.15.9",
@@ -41610,8 +40815,6 @@
},
"esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"dev": true,
"optional": true
}
@@ -41660,8 +40863,6 @@
},
"esbuild": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
- "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"requires": {
"@esbuild/android-arm": "0.15.9",
@@ -41690,8 +40891,6 @@
},
"esbuild-darwin-64": {
"version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
- "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"dev": true,
"optional": true
}
@@ -41725,8 +40924,6 @@
"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"
@@ -42023,20 +41220,6 @@
"rollup-plugin-node-polyfills": "^0.2.1"
}
},
- "@esbuild/android-arm": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz",
- "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-loong64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz",
- "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==",
- "dev": true,
- "optional": true
- },
"@eslint/eslintrc": {
"version": "1.3.0",
"dev": true,
@@ -42273,8 +41456,6 @@
},
"@ethersproject/abi": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz",
- "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==",
"requires": {
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
@@ -42289,8 +41470,6 @@
},
"@ethersproject/abstract-provider": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz",
- "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==",
"requires": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -42303,8 +41482,6 @@
},
"@ethersproject/abstract-signer": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz",
- "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==",
"requires": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
@@ -42315,8 +41492,6 @@
},
"@ethersproject/address": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz",
- "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==",
"requires": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -42327,16 +41502,12 @@
},
"@ethersproject/base64": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz",
- "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==",
"requires": {
"@ethersproject/bytes": "^5.7.0"
}
},
"@ethersproject/basex": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz",
- "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/properties": "^5.7.0"
@@ -42344,8 +41515,6 @@
},
"@ethersproject/bignumber": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz",
- "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
@@ -42354,24 +41523,18 @@
},
"@ethersproject/bytes": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz",
- "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==",
"requires": {
"@ethersproject/logger": "^5.7.0"
}
},
"@ethersproject/constants": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz",
- "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==",
"requires": {
"@ethersproject/bignumber": "^5.7.0"
}
},
"@ethersproject/contracts": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz",
- "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==",
"requires": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/abstract-provider": "^5.7.0",
@@ -42387,8 +41550,6 @@
},
"@ethersproject/hash": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz",
- "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==",
"requires": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/address": "^5.7.0",
@@ -42403,8 +41564,6 @@
},
"@ethersproject/hdnode": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz",
- "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==",
"requires": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/basex": "^5.7.0",
@@ -42422,8 +41581,6 @@
},
"@ethersproject/json-wallets": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz",
- "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==",
"requires": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/address": "^5.7.0",
@@ -42442,30 +41599,22 @@
},
"@ethersproject/keccak256": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz",
- "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"js-sha3": "0.8.0"
}
},
"@ethersproject/logger": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz",
- "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig=="
+ "version": "5.7.0"
},
"@ethersproject/networks": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz",
- "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==",
"requires": {
"@ethersproject/logger": "^5.7.0"
}
},
"@ethersproject/pbkdf2": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz",
- "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/sha2": "^5.7.0"
@@ -42473,16 +41622,12 @@
},
"@ethersproject/properties": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz",
- "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==",
"requires": {
"@ethersproject/logger": "^5.7.0"
}
},
"@ethersproject/providers": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.1.tgz",
- "integrity": "sha512-vZveG/DLyo+wk4Ga1yx6jSEHrLPgmTt+dFv0dv8URpVCRf0jVhalps1jq/emN/oXnMRsC7cQgAF32DcXLL7BPQ==",
"requires": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
@@ -42517,8 +41662,6 @@
},
"@ethersproject/random": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz",
- "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0"
@@ -42526,8 +41669,6 @@
},
"@ethersproject/rlp": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz",
- "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0"
@@ -42535,8 +41676,6 @@
},
"@ethersproject/sha2": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz",
- "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
@@ -42545,8 +41684,6 @@
},
"@ethersproject/signing-key": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz",
- "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
@@ -42558,8 +41695,6 @@
"dependencies": {
"elliptic": {
"version": "6.5.4",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
- "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
"requires": {
"bn.js": "^4.11.9",
"brorand": "^1.1.0",
@@ -42571,9 +41706,7 @@
},
"dependencies": {
"bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
+ "version": "4.12.0"
}
}
}
@@ -42581,8 +41714,6 @@
},
"@ethersproject/solidity": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz",
- "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==",
"requires": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -42594,8 +41725,6 @@
},
"@ethersproject/strings": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz",
- "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
@@ -42604,8 +41733,6 @@
},
"@ethersproject/transactions": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz",
- "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==",
"requires": {
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
@@ -42620,8 +41747,6 @@
},
"@ethersproject/units": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz",
- "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==",
"requires": {
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
@@ -42630,8 +41755,6 @@
},
"@ethersproject/wallet": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz",
- "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==",
"requires": {
"@ethersproject/abstract-provider": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
@@ -42652,8 +41775,6 @@
},
"@ethersproject/web": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz",
- "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==",
"requires": {
"@ethersproject/base64": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
@@ -42664,8 +41785,6 @@
},
"@ethersproject/wordlists": {
"version": "5.7.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz",
- "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==",
"requires": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/hash": "^5.7.0",
@@ -43461,16 +42580,12 @@
},
"@ledgerhq/cryptoassets": {
"version": "6.34.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/cryptoassets/-/cryptoassets-6.34.0.tgz",
- "integrity": "sha512-Rg3i3aOWnTFD8mtNZetZnG+7XTAWu2iuD4jCC6oUeU5wKB7Sc5m0En7LoEmEWv7ZW5VpH8NjM6uK/KWgsCwR6Q==",
"requires": {
"invariant": "2"
}
},
"@ledgerhq/devices": {
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.0.tgz",
- "integrity": "sha512-vq4B33WdU0dRAJIRFWZMj6w1W1yw1i4mekCmhk7N9wPaFrtGWZ2iI9WDihsNOBooCWKQe8Jsb9eD8RVThbSlFQ==",
"requires": {
"@ledgerhq/errors": "^6.10.1",
"@ledgerhq/logs": "^6.10.0",
@@ -43480,49 +42595,35 @@
"dependencies": {
"lru-cache": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"rxjs": {
"version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"requires": {
"tslib": "^1.9.0"
}
},
"semver": {
"version": "7.3.7",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
- "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+ "version": "1.14.1"
},
"yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ "version": "4.0.0"
}
}
},
"@ledgerhq/errors": {
- "version": "6.10.1",
- "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.1.tgz",
- "integrity": "sha512-92d1zRQleR1AQ4CAXgWgDtKUms+8EwShLVUcajI+BLWvgJ1Vclmq6PsBIDEQbsm+riVu/Ji3LcHdmgFgmi0VGw=="
+ "version": "6.10.1"
},
"@ledgerhq/hw-app-eth": {
"version": "6.29.6",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-eth/-/hw-app-eth-6.29.6.tgz",
- "integrity": "sha512-7TS6dTF30ONOqppk0J8YYVX0Cd7/Pt0Uuy77n/LRXpfsLHDABSaRROjNzxxT3q7EIMz6FQi4K4WaN8OIznkytA==",
"requires": {
"@ethersproject/abi": "^5.5.0",
"@ethersproject/rlp": "^5.5.0",
@@ -43536,16 +42637,12 @@
},
"dependencies": {
"bignumber.js": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz",
- "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A=="
+ "version": "9.1.0"
}
}
},
"@ledgerhq/hw-transport": {
"version": "6.27.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.3.tgz",
- "integrity": "sha512-vQMNCC1DUDtS+nkJsbycgFMSodmj91WuGSxX7RjOz2vuZBc6jXtDn9jzYdsfyKOwnvalQAkXm9hWWHlrMIKdNQ==",
"requires": {
"@ledgerhq/devices": "^7.0.0",
"@ledgerhq/errors": "^6.10.1",
@@ -43554,24 +42651,18 @@
},
"@ledgerhq/hw-transport-mocker": {
"version": "6.27.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-mocker/-/hw-transport-mocker-6.27.3.tgz",
- "integrity": "sha512-eweiIdbU+ZC4txin7JhLQpQ5dpMoPyyGo3O5OvD4xsZGbVNauEPYZzUks0ko5ZniCpVnB3qNfS3cU3PXdjN6Zw==",
"requires": {
"@ledgerhq/hw-transport": "^6.27.3",
"@ledgerhq/logs": "^6.10.1-nightly.0"
},
"dependencies": {
"@ledgerhq/logs": {
- "version": "6.10.1-nightly.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.1-nightly.0.tgz",
- "integrity": "sha512-hwoUwlC7le37kQ72W8hAzVq070zuY6IEpssYNXDTr3pEfc3cprTAgEnaBsb0jXQGiLdONPvxc7nPp8nSyGD3hQ=="
+ "version": "6.10.1-nightly.0"
}
}
},
"@ledgerhq/hw-transport-webhid": {
"version": "6.27.2",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.2.tgz",
- "integrity": "sha512-ZlyNheUhcxBZqjJzhSfJfeGQvNbeyWs9866rdQjVeG1zsbTJi0+6tfRv8J248QISS8vHtG5IMSxgMg9mtux9dQ==",
"requires": {
"@ledgerhq/devices": "^7.0.0",
"@ledgerhq/errors": "^6.10.1",
@@ -43580,9 +42671,7 @@
}
},
"@ledgerhq/logs": {
- "version": "6.10.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz",
- "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw=="
+ "version": "6.10.0"
},
"@mapbox/node-pre-gyp": {
"version": "1.0.9",
@@ -43881,8 +42970,6 @@
},
"@rollup/plugin-inject": {
"version": "4.0.4",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz",
- "integrity": "sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==",
"dev": true,
"requires": {
"@rollup/pluginutils": "^3.1.0",
@@ -43892,16 +42979,12 @@
"dependencies": {
"estree-walker": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true
}
}
},
"@rollup/pluginutils": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
- "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
"dev": true,
"requires": {
"@types/estree": "0.0.39",
@@ -43911,8 +42994,6 @@
"dependencies": {
"estree-walker": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
- "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
"dev": true
}
}
@@ -44217,8 +43298,6 @@
},
"@types/estree": {
"version": "0.0.39",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
- "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
"dev": true
},
"@types/ethereumjs-abi": {
@@ -44266,8 +43345,6 @@
},
"@types/http-proxy": {
"version": "1.17.9",
- "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz",
- "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -44326,8 +43403,6 @@
},
"@types/localtunnel": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/localtunnel/-/localtunnel-2.0.1.tgz",
- "integrity": "sha512-0h/ggh+tp9uKHc2eEOLdMgWW0cNwsQfn6iEE1Y44FszNB4BQyL5N6xvd5BnChZksB0YgVqa5MKxJt0dFoOKRxw==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -44837,8 +43912,6 @@
},
"@walletconnect/browser-utils": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/browser-utils/-/browser-utils-1.8.0.tgz",
- "integrity": "sha512-Wcqqx+wjxIo9fv6eBUFHPsW1y/bGWWRboni5dfD8PtOmrihrEpOCmvRJe4rfl7xgJW8Ea9UqKEaq0bIRLHlK4A==",
"requires": {
"@walletconnect/safe-json": "1.0.0",
"@walletconnect/types": "^1.8.0",
@@ -44849,8 +43922,6 @@
},
"@walletconnect/client": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/client/-/client-1.8.0.tgz",
- "integrity": "sha512-svyBQ14NHx6Cs2j4TpkQaBI/2AF4+LXz64FojTjMtV4VMMhl81jSO1vNeg+yYhQzvjcGH/GpSwixjyCW0xFBOQ==",
"requires": {
"@walletconnect/core": "^1.8.0",
"@walletconnect/iso-crypto": "^1.8.0",
@@ -44860,8 +43931,6 @@
},
"@walletconnect/core": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-1.8.0.tgz",
- "integrity": "sha512-aFTHvEEbXcZ8XdWBw6rpQDte41Rxwnuk3SgTD8/iKGSRTni50gI9S3YEzMj05jozSiOBxQci4pJDMVhIUMtarw==",
"requires": {
"@walletconnect/socket-transport": "^1.8.0",
"@walletconnect/types": "^1.8.0",
@@ -44870,8 +43939,6 @@
},
"@walletconnect/crypto": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@walletconnect/crypto/-/crypto-1.0.2.tgz",
- "integrity": "sha512-+OlNtwieUqVcOpFTvLBvH+9J9pntEqH5evpINHfVxff1XIgwV55PpbdvkHu6r9Ib4WQDOFiD8OeeXs1vHw7xKQ==",
"requires": {
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/environment": "^1.0.0",
@@ -44881,30 +43948,22 @@
},
"dependencies": {
"aes-js": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz",
- "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ=="
+ "version": "3.1.2"
}
}
},
"@walletconnect/encoding": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@walletconnect/encoding/-/encoding-1.0.1.tgz",
- "integrity": "sha512-8opL2rs6N6E3tJfsqwS82aZQDL3gmupWUgmvuZ3CGU7z/InZs3R9jkzH8wmYtpbq0sFK3WkJkQRZFFk4BkrmFA==",
"requires": {
"is-typedarray": "1.0.0",
"typedarray-to-buffer": "3.1.5"
}
},
"@walletconnect/environment": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.0.tgz",
- "integrity": "sha512-4BwqyWy6KpSvkocSaV7WR3BlZfrxLbJSLkg+j7Gl6pTDE+U55lLhJvQaMuDVazXYxcjBsG09k7UlH7cGiUI5vQ=="
+ "version": "1.0.0"
},
"@walletconnect/iso-crypto": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/iso-crypto/-/iso-crypto-1.8.0.tgz",
- "integrity": "sha512-pWy19KCyitpfXb70hA73r9FcvklS+FvO9QUIttp3c2mfW8frxgYeRXfxLRCIQTkaYueRKvdqPjbyhPLam508XQ==",
"requires": {
"@walletconnect/crypto": "^1.0.2",
"@walletconnect/types": "^1.8.0",
@@ -44913,30 +43972,22 @@
},
"@walletconnect/jsonrpc-types": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.1.tgz",
- "integrity": "sha512-+6coTtOuChCqM+AoYyi4Q83p9l/laI6NvuM2/AHaZFuf0gT0NjW7IX2+86qGyizn7Ptq4AYZmfxurAxTnhefuw==",
"requires": {
"keyvaluestorage-interface": "^1.0.0"
}
},
"@walletconnect/jsonrpc-utils": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.3.tgz",
- "integrity": "sha512-3yb49bPk16MNLk6uIIHPSHQCpD6UAo1OMOx1rM8cW/MPEAYAzrSW5hkhG7NEUwX9SokRIgnZK3QuQkiyNzBMhQ==",
"requires": {
"@walletconnect/environment": "^1.0.0",
"@walletconnect/jsonrpc-types": "^1.0.1"
}
},
"@walletconnect/mobile-registry": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz",
- "integrity": "sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw=="
+ "version": "1.4.0"
},
"@walletconnect/qrcode-modal": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/qrcode-modal/-/qrcode-modal-1.8.0.tgz",
- "integrity": "sha512-BueaFefaAi8mawE45eUtztg3ZFbsAH4DDXh1UNwdUlsvFMjqcYzLUG0xZvDd6z2eOpbgDg2N3bl6gF0KONj1dg==",
"requires": {
"@walletconnect/browser-utils": "^1.8.0",
"@walletconnect/mobile-registry": "^1.4.0",
@@ -44948,8 +43999,6 @@
},
"@walletconnect/randombytes": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@walletconnect/randombytes/-/randombytes-1.0.2.tgz",
- "integrity": "sha512-ivgOtAyqQnN0rLQmOFPemsgYGysd/ooLfaDA/ACQ3cyqlca56t3rZc7pXfqJOIETx/wSyoF5XbwL+BqYodw27A==",
"requires": {
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/environment": "^1.0.0",
@@ -44957,14 +44006,10 @@
}
},
"@walletconnect/safe-json": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.0.tgz",
- "integrity": "sha512-QJzp/S/86sUAgWY6eh5MKYmSfZaRpIlmCJdi5uG4DJlKkZrHEF7ye7gA+VtbVzvTtpM/gRwO2plQuiooIeXjfg=="
+ "version": "1.0.0"
},
"@walletconnect/socket-transport": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/socket-transport/-/socket-transport-1.8.0.tgz",
- "integrity": "sha512-5DyIyWrzHXTcVp0Vd93zJ5XMW61iDM6bcWT4p8DTRfFsOtW46JquruMhxOLeCOieM4D73kcr3U7WtyR4JUsGuQ==",
"requires": {
"@walletconnect/types": "^1.8.0",
"@walletconnect/utils": "^1.8.0",
@@ -44973,21 +44018,15 @@
"dependencies": {
"ws": {
"version": "7.5.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz",
- "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==",
"requires": {}
}
}
},
"@walletconnect/types": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-1.8.0.tgz",
- "integrity": "sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg=="
+ "version": "1.8.0"
},
"@walletconnect/utils": {
"version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-1.8.0.tgz",
- "integrity": "sha512-zExzp8Mj1YiAIBfKNm5u622oNw44WOESzo6hj+Q3apSMIb0Jph9X3GDIdbZmvVZsNPxWDL7uodKgZcCInZv2vA==",
"requires": {
"@walletconnect/browser-utils": "^1.8.0",
"@walletconnect/encoding": "^1.0.1",
@@ -44999,14 +44038,10 @@
},
"dependencies": {
"bn.js": {
- "version": "4.11.8",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
- "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
+ "version": "4.11.8"
},
"query-string": {
"version": "6.13.5",
- "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.5.tgz",
- "integrity": "sha512-svk3xg9qHR39P3JlHuD7g3nRnyay5mHbrPctEBDUxUkHRifPHXJDhBUycdCC0NBjXoDf44Gb+IsOZL1Uwn8M/Q==",
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
@@ -45016,14 +44051,10 @@
}
},
"@walletconnect/window-getters": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.0.tgz",
- "integrity": "sha512-xB0SQsLaleIYIkSsl43vm8EwETpBzJ2gnzk7e0wMF3ktqiTGS6TFHxcprMl5R44KKh4tCcHCJwolMCaDSwtAaA=="
+ "version": "1.0.0"
},
"@walletconnect/window-metadata": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.0.tgz",
- "integrity": "sha512-9eFvmJxIKCC3YWOL97SgRkKhlyGXkrHwamfechmqszbypFspaSk+t2jQXAEU7YClHF6Qjw5eYOmy1//zFi9/GA==",
"requires": {
"@walletconnect/window-getters": "^1.0.0"
}
@@ -45111,9 +44142,7 @@
"dev": true
},
"aes-js": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
- "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw=="
+ "version": "3.0.0"
},
"agent-base": {
"version": "6.0.2",
@@ -45502,8 +44531,6 @@
},
"axios": {
"version": "0.26.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
- "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
}
@@ -45867,22 +44894,16 @@
},
"buffer-alloc": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
- "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
}
},
"buffer-alloc-unsafe": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
- "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
+ "version": "1.1.0"
},
"buffer-fill": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
- "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
+ "version": "1.0.0"
},
"buffer-from": {
"version": "1.1.2"
@@ -46914,8 +45935,6 @@
},
"copy-to-clipboard": {
"version": "3.3.2",
- "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz",
- "integrity": "sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==",
"requires": {
"toggle-selection": "^1.0.6"
}
@@ -47424,9 +46443,7 @@
"version": "1.2.0"
},
"detect-browser": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.0.tgz",
- "integrity": "sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA=="
+ "version": "5.2.0"
},
"detect-indent": {
"version": "5.0.0",
@@ -47461,9 +46478,7 @@
"dev": true
},
"dijkstrajs": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz",
- "integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg=="
+ "version": "1.0.2"
},
"dir-glob": {
"version": "3.0.1",
@@ -47746,288 +46761,13 @@
"esbuild-windows-32": "0.14.54",
"esbuild-windows-64": "0.14.54",
"esbuild-windows-arm64": "0.14.54"
- },
- "dependencies": {
- "@esbuild/linux-loong64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
- "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
- "dev": true,
- "optional": true
- },
- "esbuild-android-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
- "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-android-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
- "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
- "dev": true,
- "optional": true
- },
- "esbuild-darwin-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
- "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
- "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
- "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
- "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
- "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
- "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
- "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-mips64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
- "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-ppc64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
- "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-riscv64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
- "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-s390x": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
- "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
- "dev": true,
- "optional": true
- },
- "esbuild-netbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
- "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
- "dev": true,
- "optional": true
- },
- "esbuild-openbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
- "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
- "dev": true,
- "optional": true
- },
- "esbuild-sunos-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
- "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
- "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
- "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
- "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
- "dev": true,
- "optional": true
- }
}
},
- "esbuild-android-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz",
- "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==",
- "dev": true,
- "optional": true
- },
- "esbuild-android-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz",
- "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==",
- "dev": true,
- "optional": true
- },
"esbuild-darwin-64": {
"version": "0.14.54",
"dev": true,
"optional": true
},
- "esbuild-darwin-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz",
- "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz",
- "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz",
- "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-32": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz",
- "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz",
- "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz",
- "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz",
- "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-mips64le": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz",
- "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-ppc64le": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz",
- "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-riscv64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz",
- "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-s390x": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz",
- "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==",
- "dev": true,
- "optional": true
- },
- "esbuild-netbsd-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz",
- "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==",
- "dev": true,
- "optional": true
- },
- "esbuild-openbsd-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz",
- "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==",
- "dev": true,
- "optional": true
- },
- "esbuild-sunos-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz",
- "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-32": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz",
- "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz",
- "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-arm64": {
- "version": "0.15.9",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz",
- "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==",
- "dev": true,
- "optional": true
- },
"escalade": {
"version": "3.1.1"
},
@@ -48669,8 +47409,6 @@
},
"ethers": {
"version": "5.7.1",
- "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.1.tgz",
- "integrity": "sha512-5krze4dRLITX7FpU8J4WscXqADiKmyeNlylmmDLbS95DaZpBhDe2YSwRQwKXWNyXcox7a3gBgm/MkGXV1O1S/Q==",
"requires": {
"@ethersproject/abi": "5.7.0",
"@ethersproject/abstract-provider": "5.7.0",
@@ -48730,8 +47468,6 @@
},
"eventemitter3": {
"version": "4.0.7",
- "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
- "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
"dev": true
},
"events": {
@@ -53372,7 +52108,7 @@
"keccak": {
"version": "3.0.1",
"bundled": true,
- "dev": true,
+ "extraneous": true,
"requires": {
"node-addon-api": "^2.0.0",
"node-gyp-build": "^4.2.0"
@@ -53796,7 +52532,7 @@
"node-addon-api": {
"version": "2.0.2",
"bundled": true,
- "dev": true
+ "extraneous": true
},
"node-fetch": {
"version": "2.1.2",
@@ -53805,7 +52541,7 @@
"node-gyp-build": {
"version": "4.2.3",
"bundled": true,
- "dev": true
+ "extraneous": true
},
"normalize-url": {
"version": "4.5.0",
@@ -57369,8 +56105,6 @@
},
"http-proxy": {
"version": "1.18.1",
- "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
- "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dev": true,
"requires": {
"eventemitter3": "^4.0.0",
@@ -57389,8 +56123,6 @@
},
"http-proxy-middleware": {
"version": "2.0.6",
- "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
- "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
"dev": true,
"requires": {
"@types/http-proxy": "^1.17.8",
@@ -57402,8 +56134,6 @@
"dependencies": {
"is-plain-obj": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
- "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
"dev": true
}
}
@@ -57610,8 +56340,6 @@
},
"invariant": {
"version": "2.2.4",
- "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
- "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"requires": {
"loose-envify": "^1.0.0"
}
@@ -59761,9 +58489,7 @@
}
},
"keyvaluestorage-interface": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz",
- "integrity": "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g=="
+ "version": "1.0.0"
},
"kind-of": {
"version": "6.0.3",
@@ -60070,8 +58796,6 @@
},
"localtunnel": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz",
- "integrity": "sha512-n418Cn5ynvJd7m/N1d9WVJISLJF/ellZnfsLnx8WBWGzxv/ntNcFkJ1o6se5quUhCplfLGBNL5tYHiq5WF3Nug==",
"dev": true,
"requires": {
"axios": "0.21.4",
@@ -60082,8 +58806,6 @@
"dependencies": {
"axios": {
"version": "0.21.4",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
- "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dev": true,
"requires": {
"follow-redirects": "^1.14.0"
@@ -60091,8 +58813,6 @@
},
"debug": {
"version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true,
"requires": {
"ms": "2.1.2"
@@ -60100,20 +58820,14 @@
},
"emoji-regex": {
"version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"string-width": {
"version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
@@ -60123,14 +58837,10 @@
},
"y18n": {
"version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true
},
"yargs": {
"version": "17.1.1",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz",
- "integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==",
"dev": true,
"requires": {
"cliui": "^7.0.2",
@@ -61201,8 +59911,6 @@
},
"openurl": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz",
- "integrity": "sha512-d/gTkTb1i1GKz5k3XE3XFV/PxQ1k45zDqGP2OA7YhgsaLoqm6qRvARAZOFer1fcXritWlGBRCu/UgeS4HAnXAA==",
"dev": true
},
"optionator": {
@@ -61714,9 +60422,7 @@
}
},
"pngjs": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
- "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="
+ "version": "3.4.0"
},
"posix-character-classes": {
"version": "0.1.1",
@@ -61789,9 +60495,7 @@
"dev": true
},
"preact": {
- "version": "10.4.1",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.4.1.tgz",
- "integrity": "sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q=="
+ "version": "10.4.1"
},
"prelude-ls": {
"version": "1.2.1",
@@ -61910,8 +60614,6 @@
},
"qrcode": {
"version": "1.4.4",
- "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz",
- "integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==",
"requires": {
"buffer": "^5.4.3",
"buffer-alloc": "^1.2.0",
@@ -61923,14 +60625,10 @@
},
"dependencies": {
"ansi-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="
+ "version": "4.1.1"
},
"cliui": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
- "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"requires": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
@@ -61938,27 +60636,19 @@
}
},
"emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
+ "version": "7.0.3"
},
"find-up": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w=="
+ "version": "2.0.0"
},
"locate-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -61966,29 +60656,21 @@
},
"p-limit": {
"version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ=="
+ "version": "3.0.0"
},
"string-width": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
@@ -61997,16 +60679,12 @@
},
"strip-ansi": {
"version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
},
"wrap-ansi": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
- "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"requires": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
@@ -62015,8 +60693,6 @@
},
"yargs": {
"version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"requires": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
@@ -62032,8 +60708,6 @@
},
"yargs-parser": {
"version": "13.1.2",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
- "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
@@ -62614,8 +61288,6 @@
},
"requires-port": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
- "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
"dev": true
},
"resolve": {
@@ -64141,9 +62813,7 @@
}
},
"toggle-selection": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
- "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
+ "version": "1.0.6"
},
"toidentifier": {
"version": "1.0.1"
From 7734d469bb95fc4a182d97da0630009ed81a5a42 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Wed, 5 Oct 2022 23:53:57 -0400
Subject: [PATCH 19/40] Add depoist event
---
common/data/src/index.ts | 13 +--
scripts/ethereum/dev | 58 +++++------
services/crawler/src/index.ts | 52 +++++-----
services/crawler/src/providers/Ethereum.ts | 80 ++++++++++-----
services/crawler/src/providers/Iotex.ts | 110 ++++++++++-----------
services/crawler/test/crawler.test.ts | 35 ++++---
6 files changed, 194 insertions(+), 154 deletions(-)
diff --git a/common/data/src/index.ts b/common/data/src/index.ts
index 44a87bc68..4f3470b63 100644
--- a/common/data/src/index.ts
+++ b/common/data/src/index.ts
@@ -35,19 +35,16 @@ export type EventTableColumn = {
network: string
provider: string
type: string
+ height: number
+ block: string
+ transaction: string
created_at: string
address: string
- height: number
to_address: string
- candidate: string
- candidate_list: string[]
+ validator: string
+ validator_list: string[]
amount: string
duration: number
auto_stake: boolean
- // payload: Record
}
-
-// export type EventTableColumn = {
-// [key in keyof typeof eventSchema.properties]: // what goes here?
-
export { eventSchema, aggSchema }
\ No newline at end of file
diff --git a/scripts/ethereum/dev b/scripts/ethereum/dev
index b1e620555..c56242327 100755
--- a/scripts/ethereum/dev
+++ b/scripts/ethereum/dev
@@ -3,7 +3,7 @@
#
# Example:
#
-# scripts/ethereum/dev -f
+# scripts/ethereum/dev -f -n
#
# Further information:
# See https://hardhat.org/hardhat-network/docs/overview
@@ -24,43 +24,45 @@ else
fi
# Get args
-while getopts f: flag
+while getopts :f:n: flag
do
case "${flag}" in
f) fork=${OPTARG};;
+ n) network=${OPTARG};;
esac
done
-# Secret ID is just the name or ARN
-ledger_seed_secret_id=consensus-networks-ledger-seed
-echo "🤫 Getting $ledger_seed_secret_id for $profile"
-
-# Get the secret from AWS
-ledger_seed=$(aws secretsmanager get-secret-value \
---secret-id $ledger_seed_secret_id \
---query SecretString \
---output text \
---profile $profile)
-
-export LEDGER_SEED="$ledger_seed"
-
-if [ -z "$fork" ]; then
- echo "⛓ Running default localnode"
- npm run dev:localnode --workspace @casimir/evm
-else
- # Secret ID is just the name or ARN
- alchemy_secret_id=consensus-networks-alchemy-$fork
- echo "🤫 Getting $alchemy_secret_id for $profile"
-
- # Get the secret from AWS
- alchemy_key=$(aws secretsmanager get-secret-value \
- --secret-id $alchemy_secret_id \
+# Expose RPC URL directly if network is set to mainnet or testnet
+if [ -n "$network" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-ethereum-$network
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
--query SecretString \
--output text \
--profile $profile)
- echo "⛓ Running $fork fork localnode"
- npm run dev:localnode --workspace @casimir/evm -- --fork https://eth-$fork.alchemyapi.io/v2/$alchemy_key
+ export PUBLIC_ETHEREUM_RPC="https://eth-$network.g.alchemy.com/v2/$rpc_key"
+ # export PUBLIC_SSV_ADDRESS="" # Todo get address (deterministic from deployer + tx count)
+else
+ if [ -n "$fork" ]; then
+ # Get the RPC API key from AWS
+ rpc_secret_id=consensus-networks-ethereum-$fork
+ rpc_key=$(aws secretsmanager get-secret-value \
+ --secret-id $rpc_secret_id \
+ --query SecretString \
+ --output text \
+ --profile $profile)
+
+ echo "⛓ Setting up ethereum chain with $fork fork"
+ npm run dev:node --workspace @casimir/evm -- --fork "https://eth-$fork.g.alchemy.com/v2/$rpc_key"
+ else
+ echo "⛓ Setting up ethereum chain without fork"
+ npm run dev:node --workspace @casimir/evm
+ fi
+
+ # npm run deploy:ssv --workspace @casimir/evm
+ # export PUBLIC_SSV_ADDRESS="" # Todo get address (deterministic from deployer + tx count)
fi
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index 77a715215..5691f1090 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -1,21 +1,24 @@
import { EventTableColumn } from '@casimir/data'
-import {IotexNetworkType, IotexService, newIotexService} from './providers/Iotex'
-import { EthereumService, newEthereumService } from './providers/Ethereum'
+import {IotexNetworkType, IotexService, IotexServiceOptions, newIotexService} from './providers/Iotex'
+import {EthereumService, EthereumServiceOptions, newEthereumService} from './providers/Ethereum'
import { queryAthena, uploadToS3 } from '@casimir/helpers'
export enum Chain {
- Iotex = 'iotex',
- Ethereum = 'ethereum'
+ Ethereum = 'ethereum',
+ Iotex = 'iotex'
}
export enum Provider {
Casimir = 'casimir',
}
-export const defaultEventBucket = 'casimir-etl-event-bucket-dev'
+export const eventOutputBucket = 'casimir-etl-event-bucket-dev'
+
+export type ServiceConfig = T extends Chain.Iotex ? IotexServiceOptions : T extends Chain.Ethereum ? EthereumServiceOptions : never
export interface CrawlerConfig {
chain: Chain
+ serviceOptions: ServiceConfig
output?: `s3://${string}`
verbose?: boolean
}
@@ -23,14 +26,16 @@ export interface CrawlerConfig {
class Crawler {
config: CrawlerConfig
service: EthereumService | IotexService | null
+ serviceConfig: ServiceConfig
constructor(config: CrawlerConfig) {
this.config = config
this.service = null
+ this.serviceConfig = config.serviceOptions
}
async setup(): Promise {
if (this.config.chain === Chain.Ethereum) {
- this.service = await newEthereumService({ url: 'http://localhost:8545'})
+ this.service = await newEthereumService({ url: this.serviceConfig.url || process.env.PUBLIC_ETHEREUM_RPC_URL || 'http://localhost:8545' })
return
}
@@ -53,7 +58,6 @@ class Crawler {
async start(): Promise {
if (this.service instanceof EthereumService) {
const lastEvent = await this.getLastProcessedEvent()
-
const last = lastEvent !== null ? lastEvent.height : 0
const start = parseInt(last.toString()) + 1
@@ -63,19 +67,22 @@ class Crawler {
const current = await this.service.getCurrentBlock()
- for (let i = start as number; i < current.number; i++) {
+ for (let i = start; i < 2195; i++) {
const { events, blockHash } = await this.service.getEvents(i)
- const ndjson = events.map((e: EventTableColumn) => JSON.stringify(e)).join('\n')
- await uploadToS3({
- bucket: defaultEventBucket,
- key: `${blockHash}-event.json`,
- data: ndjson
- }).finally(() => {
- if (this.config.verbose) {
- console.log(`uploaded ${events.length} event at height ${i}`)
- }
- })
+ // const { events, blockHash } = await this.service.getEvents(15676563)
}
+ // const { events, blockHash } = await this.service.getEvents(15676563)
+ // const ndjson = events.map((e: EventTableColumn) => JSON.stringify(e)).join('\n')
+ // await uploadToS3({
+ // bucket: defaultEventBucket,
+ // key: `${blockHash}-event.json`,
+ // data: ndjson
+ // }).finally(() => {
+ // if (this.config.verbose) {
+ // console.log(`uploaded ${events.length} event at height ${i}`)
+ // }
+ // })
+ // }
return
}
@@ -97,7 +104,7 @@ class Crawler {
const ndjson = events.map((e: EventTableColumn) => JSON.stringify(e)).join('\n')
await uploadToS3({
- bucket: defaultEventBucket,
+ bucket: eventOutputBucket,
key: `${hash}-event.json`,
data: ndjson
}).finally(() => {
@@ -113,9 +120,10 @@ class Crawler {
export async function crawler (config: CrawlerConfig): Promise {
const chainCrawler = new Crawler({
- chain: config.chain,
- output: config?.output ?? `s3://${defaultEventBucket}`,
- verbose: config?.verbose ?? false
+ chain: config.chain,
+ serviceOptions: config.serviceOptions,
+ output: config?.output ?? `s3://${eventOutputBucket}`,
+ verbose: config?.verbose ?? false
})
await chainCrawler.setup()
diff --git a/services/crawler/src/providers/Ethereum.ts b/services/crawler/src/providers/Ethereum.ts
index ba835e7ac..077a0d350 100644
--- a/services/crawler/src/providers/Ethereum.ts
+++ b/services/crawler/src/providers/Ethereum.ts
@@ -1,10 +1,17 @@
import { ethers } from 'ethers'
import { EventTableColumn } from '@casimir/data'
-import {Chain, Provider} from '../index'
+import { Chain, Provider } from '../index'
+
+const BeaconDepositContract = {
+ '0x00000000219ab540356cBB839Cbe05303d7705Fa': {
+ abi: ['event DepositEvent (bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index)']
+ }
+}
export type EthereumServiceOptions = {
url: string
network?: string
+ chainId?: number
}
export class EthereumService {
@@ -15,8 +22,23 @@ export class EthereumService {
this.chain = Chain.Ethereum
this.network = opt.network || 'mainnet'
this.provider = new ethers.providers.JsonRpcProvider({
- url: opt.url || 'http://localhost:8545',
+ url: opt.url,
+ })
+ }
+
+ parseLog(log: ethers.providers.Log): Record {
+ const abi = BeaconDepositContract[log.address as keyof typeof BeaconDepositContract].abi
+ const contractInterface = new ethers.utils.Interface(abi)
+ const parsedLog = contractInterface.parseLog(log)
+ const args = parsedLog.args.slice(-1 * parsedLog.eventFragment.inputs.length)
+
+ const input: Record = {}
+
+ parsedLog.eventFragment.inputs.forEach((key, index) => {
+ console.log('Key', key.name)
+ input[key.name] = args[index]
})
+ return input
}
async getEvents(height: number): Promise<{ blockHash: string, events: EventTableColumn[] }> {
@@ -40,23 +62,25 @@ export class EthereumService {
auto_stake: false,
})
- if (block.transactions.length > 0) {
- for (const tx of block.transactions) {
- events.push({
- chain: this.chain,
- network: this.network,
- provider: Provider.Casimir,
- type: tx.type === 0 ? 'transfer' : 'contract',
- created_at: new Date(block.timestamp * 1000).toISOString(),
- address: tx.from,
- height: block.number,
- to_address: tx.to || '',
- candidate: '',
- candidate_list: [],
- duration: 0,
- amount: tx.value.toString(),
- auto_stake: false,
- })
+ if (block.transactions.length === 0) {
+ return { blockHash: block.hash, events }
+ }
+
+ for await (const tx of block.transactions) {
+ const receipts = await this.provider.getTransactionReceipt(tx.hash)
+
+ if (receipts.logs.length === 0) {
+ continue
+ }
+
+ // check if its a regualr transfer
+
+ for (const log of receipts.logs) {
+ if (log.address in BeaconDepositContract) {
+ // const contractInterface = new ethers.utils.Interface(BeaconDepositContract[log.address as keyof typeof BeaconDepositContract].abi)
+ const parsedLog = this.parseLog(log)
+ console.log(parsedLog)
+ }
}
}
return {
@@ -69,20 +93,26 @@ export class EthereumService {
return await this.provider.getBlock(height)
}
- async getBlock(num: number): Promise {
+ async getBlockWithTx(num: number): Promise {
return await this.provider.getBlockWithTransactions(num)
}
- async getTransaction(tx: string): Promise {
- return await this.provider.getTransaction(tx)
- }
-
on(event:string, cb: (block: ethers.providers.Block) => void): void {
this.provider.on('block', async (blockNumber: number) => {
- const block = await this.getBlock(blockNumber)
+ const block = await this.getBlockWithTx(blockNumber)
cb(block)
})
}
+
+ async ping(rpcUrl: string): Promise {
+ const provider = new ethers.providers.JsonRpcProvider(rpcUrl)
+ try {
+ const block = await provider.getBlockNumber()
+ return true
+ } catch (e) {
+ return false
+ }
+ }
}
export function newEthereumService (opt: EthereumServiceOptions): EthereumService {
diff --git a/services/crawler/src/providers/Iotex.ts b/services/crawler/src/providers/Iotex.ts
index cb0f96979..eb55440b7 100644
--- a/services/crawler/src/providers/Iotex.ts
+++ b/services/crawler/src/providers/Iotex.ts
@@ -34,7 +34,7 @@ export enum IotexActionType {
StakeChangeCandidate = 'stakeChangeCandidate',
}
-export type IotexOptions = Opts & {
+export type IotexServiceOptions = Opts & {
url: string
network: IotexNetworkType
}
@@ -44,7 +44,7 @@ export class IotexService {
network: IotexNetworkType
provider: Antenna
chainId: number
- constructor (opt: IotexOptions) {
+ constructor (opt: IotexServiceOptions) {
this.chain = Chain.Iotex
this.network = opt.network || IotexNetworkType.Mainnet
this.chainId = IotexNetworkType.Mainnet ? 4689 : 4690
@@ -63,6 +63,58 @@ export class IotexService {
return type as IotexActionType
}
+ async getBlocks(start: number, count: number): Promise {
+ if (start < 0 || count < 0) {
+ throw new Error('start and count must be greater than 0')
+ }
+
+ if (start === 0) {
+ start = 1
+ }
+
+ if (count === 0) {
+ count = 100
+ }
+
+ const blocks = await this.provider.iotx.getBlockMetas({ byIndex: { start: start, count: count } })
+
+ return blocks
+ }
+
+ async getBlockActions (index: number, count: number): Promise {
+ const actions = await this.provider.iotx.getActions({
+ byIndex: {
+ start: index,
+ count: count
+ }
+ })
+ return actions.actionInfo
+ }
+
+ async getCurrentBlock(): Promise {
+ const { chainMeta } = await this.provider.iotx.getChainMeta({
+ includePendingActions: false
+ })
+
+ const block = await this.provider.iotx.getBlockMetas({ byIndex: { start: parseInt(chainMeta.height), count: 1 } })
+ return block
+ }
+
+ async readableBlockStream (): Promise> {
+ const stream = await this.provider.iotx.streamBlocks({
+ start: 1
+ })
+ return stream
+ }
+
+ on(event: string, callback: (data: IStreamBlocksResponse) => void): void {
+ this.provider.iotx.streamBlocks({
+ start: 1
+ }).on('data', (data: IStreamBlocksResponse) => {
+ callback(data)
+ })
+ }
+
async getEvents(height: number): Promise<{ hash: string, events: EventTableColumn[]}> {
const events: EventTableColumn[] = []
@@ -194,59 +246,7 @@ export class IotexService {
events
}
}
-
- async getBlocks(start: number, count: number): Promise {
- if (start < 0 || count < 0) {
- throw new Error('start and count must be greater than 0')
- }
-
- if (start === 0) {
- start = 1
- }
-
- if (count === 0) {
- count = 100
- }
-
- const blocks = await this.provider.iotx.getBlockMetas({ byIndex: { start: start, count: count } })
-
- return blocks
- }
-
- async getBlockActions (index: number, count: number): Promise {
- const actions = await this.provider.iotx.getActions({
- byIndex: {
- start: index,
- count: count
- }
- })
- return actions.actionInfo
- }
-
- async getCurrentBlock(): Promise {
- const { chainMeta } = await this.provider.iotx.getChainMeta({
- includePendingActions: false
- })
-
- const block = await this.provider.iotx.getBlockMetas({ byIndex: { start: parseInt(chainMeta.height), count: 1 } })
- return block
- }
-
- async readableBlockStream (): Promise> {
- const stream = await this.provider.iotx.streamBlocks({
- start: 1
- })
- return stream
- }
-
- on(event: string, callback: (data: IStreamBlocksResponse) => void): void {
- this.provider.iotx.streamBlocks({
- start: 1
- }).on('data', (data: IStreamBlocksResponse) => {
- callback(data)
- })
- }
}
-export function newIotexService (opt: IotexOptions): IotexService {
+export function newIotexService (opt: IotexServiceOptions): IotexService {
return new IotexService(opt)
}
\ No newline at end of file
diff --git a/services/crawler/test/crawler.test.ts b/services/crawler/test/crawler.test.ts
index 1f4c106c5..9509a939f 100644
--- a/services/crawler/test/crawler.test.ts
+++ b/services/crawler/test/crawler.test.ts
@@ -1,26 +1,29 @@
import { crawler } from '../src/index'
import { Chain } from '../src/index'
-test('init crawler for iotex', async () => {
- const iotex = await crawler({
- chain: Chain.Iotex,
- verbose: true
- })
- await iotex.start()
- expect(iotex.service).not.toBe(null)
-})
-
-jest.setTimeout(1000000)
-
-// test('init crawler for ethereum', async () => {
-// const eth = await crawler({
-// chain: Chain.Ethereum,
+// test('init crawler for iotex', async () => {
+// const iotex = await crawler({
+// chain: Chain.Iotex,
// verbose: true
// })
-// await eth.start()
-// expect(eth.service).not.toBe(null)
+// await iotex.start()
+// expect(iotex.service).not.toBe(null)
// })
+jest.setTimeout(1000000)
+
+test('init crawler for ethereum', async () => {
+ const eth = await crawler({
+ chain: Chain.Ethereum,
+ serviceOptions: {
+ url: 'https://eth-mainnet.alchemyapi.io/v2/5zDQdGo96cD5RJSDuUcS9HktqFOBJH05'
+ },
+ verbose: true
+ })
+ await eth.start()
+ expect(eth.service).not.toBe(null)
+})
+
// test('query athena thru service', async () => {
// const supercrawler = await crawler({
// chain: Chain.Ethereum,
From 1ff21879eeb5c8538e3477721aad39097591308f Mon Sep 17 00:00:00 2001
From: hawyar
Date: Thu, 6 Oct 2022 11:35:01 -0400
Subject: [PATCH 20/40] Clean
---
common/data/src/index.ts | 4 +-
services/crawler/src/index.ts | 46 +++++++--------
services/crawler/src/providers/Ethereum.ts | 65 +++++++++++++++-------
services/crawler/src/providers/Iotex.ts | 52 ++++++++---------
services/crawler/test/crawler.test.ts | 24 ++++----
5 files changed, 106 insertions(+), 85 deletions(-)
diff --git a/common/data/src/index.ts b/common/data/src/index.ts
index 4f3470b63..97c57059a 100644
--- a/common/data/src/index.ts
+++ b/common/data/src/index.ts
@@ -19,7 +19,7 @@ export function schemaToGlueColumns(jsonSchema: JsonSchema): glue.Column[] {
let type: glue.Type = glue.Schema[typeKey]
- if (name.endsWith('at')) type = glue.Schema.TIMESTAMP
+ if (name.endsWith('_at')) type = glue.Schema.TIMESTAMP
if (name.endsWith('_list')) type = glue.Schema.array(glue.Schema.STRING)
@@ -30,7 +30,7 @@ export function schemaToGlueColumns(jsonSchema: JsonSchema): glue.Column[] {
})
}
-export type EventTableColumn = {
+export type EventTableSchema = {
chain: string
network: string
provider: string
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index 5691f1090..6eddb0c8b 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -1,7 +1,8 @@
-import { EventTableColumn } from '@casimir/data'
+import { EventTableSchema } from '@casimir/data'
import {IotexNetworkType, IotexService, IotexServiceOptions, newIotexService} from './providers/Iotex'
import {EthereumService, EthereumServiceOptions, newEthereumService} from './providers/Ethereum'
import { queryAthena, uploadToS3 } from '@casimir/helpers'
+import fs from 'fs'
export enum Chain {
Ethereum = 'ethereum',
@@ -14,11 +15,9 @@ export enum Provider {
export const eventOutputBucket = 'casimir-etl-event-bucket-dev'
-export type ServiceConfig = T extends Chain.Iotex ? IotexServiceOptions : T extends Chain.Ethereum ? EthereumServiceOptions : never
-
export interface CrawlerConfig {
chain: Chain
- serviceOptions: ServiceConfig
+ options?: IotexServiceOptions | EthereumServiceOptions
output?: `s3://${string}`
verbose?: boolean
}
@@ -26,16 +25,14 @@ export interface CrawlerConfig {
class Crawler {
config: CrawlerConfig
service: EthereumService | IotexService | null
- serviceConfig: ServiceConfig
constructor(config: CrawlerConfig) {
this.config = config
this.service = null
- this.serviceConfig = config.serviceOptions
}
async setup(): Promise {
if (this.config.chain === Chain.Ethereum) {
- this.service = await newEthereumService({ url: this.serviceConfig.url || process.env.PUBLIC_ETHEREUM_RPC_URL || 'http://localhost:8545' })
+ this.service = await newEthereumService({ url: this.config?.options?.url || process.env.PUBLIC_ETHEREUM_RPC_URL || 'http://localhost:8545' })
return
}
@@ -46,7 +43,7 @@ class Crawler {
throw new Error('InvalidChain: chain is not supported')
}
- async getLastProcessedEvent(): Promise {
+ async getLastProcessedEvent(): Promise {
const event = await queryAthena(`SELECT * FROM "casimir_etl_database_dev"."casimir_etl_event_table_dev" where chain = '${this.config.chain}' ORDER BY height DESC limit 1`)
if (event !== null && event.length === 1) {
@@ -67,22 +64,19 @@ class Crawler {
const current = await this.service.getCurrentBlock()
- for (let i = start; i < 2195; i++) {
- const { events, blockHash } = await this.service.getEvents(i)
- // const { events, blockHash } = await this.service.getEvents(15676563)
+ for (let i = start; i < current.number; i++) {
+ const {events, blockHash} = await this.service.getEvents(15000000 + i)
+ const ndjson = events.map((e: EventTableSchema) => JSON.stringify(e)).join('\n')
+ await uploadToS3({
+ bucket: eventOutputBucket,
+ key: `${blockHash}-event.json`,
+ data: ndjson
+ }).finally(() => {
+ if (this.config.verbose) {
+ console.log(`uploaded events for block ${blockHash}`)
+ }
+ })
}
- // const { events, blockHash } = await this.service.getEvents(15676563)
- // const ndjson = events.map((e: EventTableColumn) => JSON.stringify(e)).join('\n')
- // await uploadToS3({
- // bucket: defaultEventBucket,
- // key: `${blockHash}-event.json`,
- // data: ndjson
- // }).finally(() => {
- // if (this.config.verbose) {
- // console.log(`uploaded ${events.length} event at height ${i}`)
- // }
- // })
- // }
return
}
@@ -101,7 +95,7 @@ class Crawler {
for (let i = start; i < currentHeight; i++) {
const { hash, events } = await this.service.getEvents(i)
- const ndjson = events.map((e: EventTableColumn) => JSON.stringify(e)).join('\n')
+ const ndjson = events.map((e: EventTableSchema) => JSON.stringify(e)).join('\n')
await uploadToS3({
bucket: eventOutputBucket,
@@ -109,7 +103,7 @@ class Crawler {
data: ndjson
}).finally(() => {
if (this.config.verbose) {
- console.log(`uploaded ${events.length} event at height ${i}`)
+ console.log(`uploaded events for block ${hash}`)
}
})
}
@@ -121,7 +115,7 @@ class Crawler {
export async function crawler (config: CrawlerConfig): Promise {
const chainCrawler = new Crawler({
chain: config.chain,
- serviceOptions: config.serviceOptions,
+ options: config.options,
output: config?.output ?? `s3://${eventOutputBucket}`,
verbose: config?.verbose ?? false
})
diff --git a/services/crawler/src/providers/Ethereum.ts b/services/crawler/src/providers/Ethereum.ts
index 077a0d350..b40707a10 100644
--- a/services/crawler/src/providers/Ethereum.ts
+++ b/services/crawler/src/providers/Ethereum.ts
@@ -1,5 +1,5 @@
import { ethers } from 'ethers'
-import { EventTableColumn } from '@casimir/data'
+import { EventTableSchema } from '@casimir/data'
import { Chain, Provider } from '../index'
const BeaconDepositContract = {
@@ -41,8 +41,8 @@ export class EthereumService {
return input
}
- async getEvents(height: number): Promise<{ blockHash: string, events: EventTableColumn[] }> {
- const events: EventTableColumn[] = []
+ async getEvents(height: number): Promise<{ blockHash: string, events: EventTableSchema[] }> {
+ const events: EventTableSchema[] = []
const block = await this.provider.getBlockWithTransactions(height)
@@ -51,15 +51,17 @@ export class EthereumService {
network: this.network,
provider: Provider.Casimir,
type: 'block',
+ block: block.hash,
+ transaction: "",
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: block.miner,
height: block.number,
- to_address: '',
- candidate: '',
+ to_address: "",
+ validator: '',
duration: 0,
- candidate_list: [],
+ validator_list: [],
amount: '0',
- auto_stake: false,
+ auto_stake: false
})
if (block.transactions.length === 0) {
@@ -67,19 +69,52 @@ export class EthereumService {
}
for await (const tx of block.transactions) {
+ events.push({
+ chain: this.chain,
+ network: this.network,
+ provider: Provider.Casimir,
+ type: 'transaction',
+ block: block.hash,
+ transaction: tx.hash,
+ created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
+ address: tx.from,
+ to_address: tx.to || '',
+ height: block.number,
+ validator: '',
+ validator_list: [],
+ duration: 0,
+ amount: tx.value.toString(),
+ auto_stake: false
+ })
+
const receipts = await this.provider.getTransactionReceipt(tx.hash)
if (receipts.logs.length === 0) {
continue
}
- // check if its a regualr transfer
-
for (const log of receipts.logs) {
if (log.address in BeaconDepositContract) {
- // const contractInterface = new ethers.utils.Interface(BeaconDepositContract[log.address as keyof typeof BeaconDepositContract].abi)
const parsedLog = this.parseLog(log)
console.log(parsedLog)
+ const logEvent: EventTableSchema = {
+ chain: this.chain,
+ network: this.network,
+ provider: Provider.Casimir,
+ type: 'deposit',
+ block: block.hash,
+ transaction: tx.hash,
+ created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
+ address: log.address,
+ height: block.number,
+ to_address: '',
+ validator: '',
+ duration: 0,
+ validator_list: [],
+ amount: parsedLog.amount.toString(),
+ auto_stake: false
+ }
+ events.push(logEvent)
}
}
}
@@ -103,16 +138,6 @@ export class EthereumService {
cb(block)
})
}
-
- async ping(rpcUrl: string): Promise {
- const provider = new ethers.providers.JsonRpcProvider(rpcUrl)
- try {
- const block = await provider.getBlockNumber()
- return true
- } catch (e) {
- return false
- }
- }
}
export function newEthereumService (opt: EthereumServiceOptions): EthereumService {
diff --git a/services/crawler/src/providers/Iotex.ts b/services/crawler/src/providers/Iotex.ts
index eb55440b7..a42b0ea11 100644
--- a/services/crawler/src/providers/Iotex.ts
+++ b/services/crawler/src/providers/Iotex.ts
@@ -7,7 +7,7 @@ import {
IStreamBlocksResponse,
} from 'iotex-antenna/lib/rpc-method/types'
import { Opts } from 'iotex-antenna/lib/antenna'
-import { EventTableColumn } from '@casimir/data'
+import { EventTableSchema } from '@casimir/data'
import {Chain, Provider} from '../index'
export enum IotexNetworkType {
@@ -115,14 +115,16 @@ export class IotexService {
})
}
- async getEvents(height: number): Promise<{ hash: string, events: EventTableColumn[]}> {
- const events: EventTableColumn[] = []
+ async getEvents(height: number): Promise<{ hash: string, events: EventTableSchema[]}> {
+ const events: EventTableSchema[] = []
const block = await this.provider.iotx.getBlockMetas({byIndex: {start: height, count: 1}})
const blockMeta = block.blkMetas[0]
events.push({
+ block: blockMeta.hash,
+ transaction: "",
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
@@ -131,11 +133,11 @@ export class IotexService {
address: blockMeta.producerAddress,
height: blockMeta.height,
to_address: '',
- candidate: '',
+ validator: '',
duration: 0,
- candidate_list: [],
+ validator_list: [],
amount: '0',
- auto_stake: false,
+ auto_stake: false
})
const numOfActions = block.blkMetas[0].numActions
@@ -150,7 +152,7 @@ export class IotexService {
const actionType = this.deduceActionType(action)
if (actionType === null) return
- const actionEvent: Partial = {
+ const actionEvent: Partial = {
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
@@ -159,9 +161,9 @@ export class IotexService {
address: blockMeta.producerAddress,
height: blockMeta.height,
to_address: '',
- candidate: '',
+ validator: '',
duration: 0,
- candidate_list: [],
+ validator_list: [],
amount: '0',
auto_stake: false,
}
@@ -169,60 +171,60 @@ export class IotexService {
if (actionType === IotexActionType.transfer && actionCore.transfer) {
actionEvent.amount = actionCore.transfer.amount
actionEvent.to_address = actionCore.transfer.recipient
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.stakeCreate && actionCore.stakeCreate) {
actionEvent.amount = actionCore.stakeCreate.stakedAmount
- actionEvent.candidate = actionCore.stakeCreate.candidateName
+ actionEvent.validator = actionCore.stakeCreate.candidateName
actionEvent.auto_stake = actionCore.stakeCreate.autoStake
actionEvent.duration = actionCore.stakeCreate.stakedDuration
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.stakeAddDeposit && actionCore.stakeAddDeposit) {
actionEvent.amount = actionCore.stakeAddDeposit.amount
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.execution && actionCore.execution) {
actionEvent.amount = actionCore.execution.amount
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.putPollResult && actionCore.putPollResult) {
if (actionCore.putPollResult.candidates) {
- actionEvent.candidate_list = actionCore.putPollResult.candidates.candidates.map(c => c.address)
+ actionEvent.validator_list = actionCore.putPollResult.candidates.candidates.map(c => c.address)
}
if (actionCore.putPollResult.height) {
actionEvent.height = typeof actionCore.putPollResult.height === 'string' ? parseInt(actionCore.putPollResult.height) : actionCore.putPollResult.height
}
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.StakeChangeCandidate && actionCore.stakeChangeCandidate) {
- actionEvent.candidate = actionCore.stakeChangeCandidate.candidateName
- events.push(actionEvent as EventTableColumn)
+ actionEvent.validator = actionCore.stakeChangeCandidate.candidateName
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.stakeRestake && actionCore.stakeRestake) {
actionEvent.duration = actionCore.stakeRestake.stakedDuration
actionEvent.auto_stake = actionCore.stakeRestake.autoStake
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.candidateRegister && actionCore.candidateRegister) {
actionEvent.amount = actionCore.candidateRegister.stakedAmount
actionEvent.duration = actionCore.candidateRegister.stakedDuration
actionEvent.auto_stake = actionCore.candidateRegister.autoStake
- actionEvent.candidate = actionCore.candidateRegister.candidate.name
- events.push(actionEvent as EventTableColumn)
+ actionEvent.validator = actionCore.candidateRegister.candidate.name
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.candidateUpdate && actionCore.candidateUpdate) {
- actionEvent.candidate = actionCore.candidateUpdate.name
- events.push(actionEvent as EventTableColumn)
+ actionEvent.validator = actionCore.candidateUpdate.name
+ events.push(actionEvent as EventTableSchema)
}
if (actionType === IotexActionType.claimFromRewardingFund && actionCore.claimFromRewardingFund) {
@@ -231,7 +233,7 @@ export class IotexService {
if (actionType === IotexActionType.depositToRewardingFund && actionCore.depositToRewardingFund) {
actionEvent.amount = actionCore.depositToRewardingFund.amount
- events.push(actionEvent as EventTableColumn)
+ events.push(actionEvent as EventTableSchema)
}
// if (actionType === IotexActionType.grantReward) {}
@@ -239,7 +241,7 @@ export class IotexService {
// if (actionType === IotexActionType.stakeWithdraw) {}
return actionEvent
})
- events.push(...blockActions as EventTableColumn[])
+ events.push(...blockActions as EventTableSchema[])
}
return {
hash: blockMeta.hash,
diff --git a/services/crawler/test/crawler.test.ts b/services/crawler/test/crawler.test.ts
index 9509a939f..fa4766ed4 100644
--- a/services/crawler/test/crawler.test.ts
+++ b/services/crawler/test/crawler.test.ts
@@ -1,22 +1,13 @@
import { crawler } from '../src/index'
import { Chain } from '../src/index'
-// test('init crawler for iotex', async () => {
-// const iotex = await crawler({
-// chain: Chain.Iotex,
-// verbose: true
-// })
-// await iotex.start()
-// expect(iotex.service).not.toBe(null)
-// })
-
jest.setTimeout(1000000)
test('init crawler for ethereum', async () => {
const eth = await crawler({
chain: Chain.Ethereum,
- serviceOptions: {
- url: 'https://eth-mainnet.alchemyapi.io/v2/5zDQdGo96cD5RJSDuUcS9HktqFOBJH05'
+ options: {
+ url: 'https://eth-mainnet.alchemyapi.io/v2/5zDQdGo96cD5RJSDuUcS9HktqFOBJH05',
},
verbose: true
})
@@ -24,10 +15,19 @@ test('init crawler for ethereum', async () => {
expect(eth.service).not.toBe(null)
})
+// test('init crawler for iotex', async () => {
+// const iotex = await crawler({
+// chain: Chain.Iotex,
+// verbose: true
+// })
+// await iotex.start()
+// expect(iotex.service).not.toBe(null)
+// })
+
// test('query athena thru service', async () => {
// const supercrawler = await crawler({
// chain: Chain.Ethereum,
-// verbose: true
+// verbose: true,
// })
//
// const lastBlock = await supercrawler.getLastProcessedEvent()
From 3786eaf1ac90647c1a6c4bcf0cee05189526af36 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 6 Oct 2022 14:29:58 -0500
Subject: [PATCH 21/40] Use one tx ref for use by different providers in
respective composables
---
apps/web/src/composables/iopay.ts | 7 ++++---
apps/web/src/composables/ledger.ts | 14 ++++++-------
apps/web/src/composables/wallet.ts | 25 ++++++++++-------------
apps/web/src/composables/walletConnect.ts | 10 ++++-----
4 files changed, 26 insertions(+), 30 deletions(-)
diff --git a/apps/web/src/composables/iopay.ts b/apps/web/src/composables/iopay.ts
index 2695c36ce..811170b28 100644
--- a/apps/web/src/composables/iopay.ts
+++ b/apps/web/src/composables/iopay.ts
@@ -1,6 +1,7 @@
import Antenna from 'iotex-antenna'
import { WsSignerPlugin } from 'iotex-antenna/lib/plugin/ws'
import { toRau } from 'iotex-antenna/lib/account/utils'
+import { TransactionInit } from '@/interfaces/TransactionInit'
export default function useIoPay() {
const signer = new WsSignerPlugin()
@@ -12,12 +13,12 @@ export default function useIoPay() {
return await signer.getAccounts()
}
- const sendIoPayTransaction = async (toAddress: string, amount: string) => {
+ const sendIoPayTransaction = async ({to, value}: TransactionInit) => {
try {
const transResp = await antenna?.iotx.sendTransfer({
- to: `${toAddress}`,
+ to: `${to}`,
from: antenna.iotx.accounts[0].address,
- value: toRau(amount, 'Iotx'),
+ value: toRau(value, 'Iotx'),
gasLimit: '100000',
gasPrice: toRau('1', 'Qev'),
})
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index 52763856f..3456c8474 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -27,10 +27,10 @@ export default function useLedger() {
async function sendLedgerTransaction({ from, to, value }: TransactionInit) {
const rpcUrl = import.meta.env.PUBLIC_ETHEREUM_RPC || 'http://localhost:8545/'
const provider = new ethers.providers.JsonRpcProvider(rpcUrl)
- const { chainId } = await provider.getNetwork() // Why this?
- const gasPriceHex = (await provider.getGasPrice())._hex // What is offering us this?
- const gasPrice = '0x' + (parseInt(gasPriceHex, 16) * 1.15).toString(16) // Why this?
- const nonce = await provider.getTransactionCount(from, 'latest') // Why do we have the option not to provide this?
+ const { chainId } = await provider.getNetwork()
+ const gasPriceHex = (await provider.getGasPrice())._hex
+ const gasPrice = '0x' + (parseInt(gasPriceHex, 16) * 1.15).toString(16)
+ const nonce = await provider.getTransactionCount(from, 'latest')
const unsignedTransaction: ethers.utils.UnsignedTransaction = {
to,
gasPrice,
@@ -38,12 +38,12 @@ export default function useLedger() {
chainId,
data: '0x00',
value: ethers.utils.parseUnits(value)
- } // What did I have before??
+ }
- // Todo check before click (user can +/- gas limit accordingly) // Are you saying to provide another front-end input field for gas limit?
+ // Todo check before click (user can +/- gas limit accordingly)
const gasEstimate = await provider.estimateGas(
unsignedTransaction as Deferrable
- ) // Why is this a thing (having a gasEstimate and gasLimit)?
+ )
const gasLimit = Math.ceil(parseInt(gasEstimate.toString()) * 1.3)
unsignedTransaction.gasLimit = ethers.utils.hexlify(gasLimit)
const balance = await provider.getBalance(from)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index 79caa901c..c0d4801af 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -1,10 +1,11 @@
-import { ref } from 'vue'
+import { Ref, ref } from 'vue'
import { ethers } from 'ethers'
import useIoPay from '@/composables/iopay'
import useLedger from '@/composables/ledger'
import useEthers from '@/composables/ethers'
import useWalletConnect from '@/composables/walletConnect'
import { ProviderString } from '@/types/ProviderString'
+import { TransactionInit } from '@/interfaces/TransactionInit'
const { ethersProviderList, requestEthersAccount, sendEthersTransaction, signEthersMessage } = useEthers()
const {
@@ -15,10 +16,6 @@ const {
const amount = ref('0.001')
const toAddress = ref('0x728474D29c2F81eb17a669a7582A2C17f1042b57')
-const tx = ref({
- to: toAddress.value,
- value: amount.value,
-})
// Test ethereum send to address : 0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
@@ -78,24 +75,24 @@ export default function useWallet() {
}
async function sendTransaction(provider: string) {
+ const tx: Ref = ref({
+ from: selectedAccount.value,
+ to: toAddress.value,
+ value: amount.value,
+ })
+
try {
if (provider === 'WalletConnect') {
- await sendWalletConnectTransaction(amount.value, toAddress.value)
+ await sendWalletConnectTransaction(tx.value)
} else if (ethersProviderList.includes(provider)) {
await sendEthersTransaction(
provider as ProviderString,
tx.value
)
} else if (selectedProvider.value === 'IoPay') {
- await sendIoPayTransaction(toAddress.value, amount.value)
+ await sendIoPayTransaction(tx.value)
} else if (selectedProvider.value === 'Ledger') {
- const transactionInit = {
- from: selectedAccount.value,
- to: toAddress.value,
- value: amount.value
- }
- const { hash } = await sendLedgerTransaction(transactionInit)
- console.log('Transaction sent', hash)
+ await sendLedgerTransaction(tx.value)
} else {
throw new Error('Provider selected not yet supported')
}
diff --git a/apps/web/src/composables/walletConnect.ts b/apps/web/src/composables/walletConnect.ts
index 64a0ad257..07be5f57b 100644
--- a/apps/web/src/composables/walletConnect.ts
+++ b/apps/web/src/composables/walletConnect.ts
@@ -2,6 +2,7 @@ import WalletConnect from '@walletconnect/client'
import QRCodeModal from '@walletconnect/qrcode-modal'
import { ref, Ref } from 'vue'
import { ethers } from 'ethers'
+import { TransactionInit } from '@/interfaces/TransactionInit'
export default function useWalletConnect() {
const connector: Ref = ref()
@@ -45,21 +46,18 @@ export default function useWalletConnect() {
}
async function sendWalletConnectTransaction(
- amount: string,
- toAddress: string
+ {to, value}: TransactionInit
) {
- const amountInWei = ethers.utils.parseEther(amount).toString()
-
+ const amountInWei = ethers.utils.parseEther(value).toString()
// TODO: Better understand and handle gasPrice and gasLimit
const gasLimit = ethers.utils.hexlify(21000).toString()
const gasPrice = ethers.utils.hexlify(1000000000).toString()
const tx = {
from: walletConnectAddress.value,
- to: toAddress,
+ to,
gas: gasLimit,
gasPrice: gasPrice,
value: amountInWei,
- // data: 'data', // TODO: Determine when this is needed.
// nonce: 'nonce', // TODO: Determine when this is needed.
}
try {
From 4df4a690e4aa9702306143565f88f20179924872 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 6 Oct 2022 16:07:25 -0500
Subject: [PATCH 22/40] Use disableWalletConnect from composable to disconnect
WalletConnect
---
apps/web/src/composables/wallet.ts | 13 +++----------
apps/web/src/composables/walletConnect.ts | 2 +-
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index c0d4801af..d27131a78 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -39,6 +39,9 @@ export default function useWallet() {
async function connectWallet(provider: ProviderString) {
try {
+ if (selectedProvider.value === 'WalletConnect' && provider !== 'WalletConnect') {
+ await disableWalletConnect()
+ }
setSelectedProvider(provider)
selectedAccount.value = 'Not Active'
if (provider === 'WalletConnect') {
@@ -65,15 +68,6 @@ export default function useWallet() {
}
}
- // TODO: Fold this into the logic of switching to/from other wallet provider depending on front-end implementation
- async function disconnectWallet(provider: ProviderString) {
- selectedAccount.value = ''
- selectedProvider.value = ''
- if (provider === 'WalletConnect') {
- await disableWalletConnect()
- }
- }
-
async function sendTransaction(provider: string) {
const tx: Ref = ref({
from: selectedAccount.value,
@@ -125,7 +119,6 @@ export default function useWallet() {
toAddress,
amount,
connectWallet,
- disconnectWallet,
sendTransaction,
signMessage,
}
diff --git a/apps/web/src/composables/walletConnect.ts b/apps/web/src/composables/walletConnect.ts
index 07be5f57b..f11b026e1 100644
--- a/apps/web/src/composables/walletConnect.ts
+++ b/apps/web/src/composables/walletConnect.ts
@@ -58,7 +58,7 @@ export default function useWalletConnect() {
gas: gasLimit,
gasPrice: gasPrice,
value: amountInWei,
- // nonce: 'nonce', // TODO: Determine when this is needed.
+ // nonce: 'nonce', // TODO: Use ethers to get nonce for current address
}
try {
const result = await connector.value?.sendTransaction(tx)
From fc958b4b4115afdce71a9170f03b4f3daadaf43d Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 6 Oct 2022 16:37:58 -0500
Subject: [PATCH 23/40] Update wallet component with phantom code
---
apps/web/src/components/Wallet.vue | 68 +++++++++++++++++-----------
apps/web/src/types/ProviderString.ts | 1 +
2 files changed, 42 insertions(+), 27 deletions(-)
diff --git a/apps/web/src/components/Wallet.vue b/apps/web/src/components/Wallet.vue
index 12e3e28b4..a5467ef6c 100644
--- a/apps/web/src/components/Wallet.vue
+++ b/apps/web/src/components/Wallet.vue
@@ -31,44 +31,38 @@
+
+
+
+ Connected phantom Account:
+ {{ phantomAccountsResult }}
+
+
-
@@ -87,6 +81,8 @@ const coinbaseButtonText = ref('Connect Coinbase')
const coinbaseAccountsResult = ref('Address Not Active')
const ioPayButtonText = ref('Connect ioPay')
const ioPayAccountsResult = ref('Address Not Active')
+const phantomButtonText = ref('Connect Phantom')
+const phantomAccountsResult = ref('Address Not Active')
const {
selectedProvider,
@@ -94,7 +90,6 @@ const {
toAddress,
amount,
connectWallet,
- disconnectWallet,
sendTransaction,
signMessage,
} = useWallet()
@@ -107,6 +102,8 @@ watchEffect(() => {
ioPayButtonText.value = 'Connect ioPay'
coinbaseAccountsResult.value = 'Not Active'
ioPayAccountsResult.value = 'Not Active'
+ phantomButtonText.value = 'Connect Phantom'
+ phantomAccountsResult.value = 'Not Active'
} else if (selectedProvider.value === 'CoinbaseWallet') {
metamaskButtonText.value = 'Connect Metamask'
coinbaseButtonText.value = 'Coinbase Connected'
@@ -114,6 +111,8 @@ watchEffect(() => {
metamaskAccountsResult.value = 'Not Active'
coinbaseAccountsResult.value = selectedAccount.value
ioPayAccountsResult.value = 'Not Active'
+ phantomButtonText.value = 'Connect Phantom'
+ phantomAccountsResult.value = 'Not Active'
} else if (selectedProvider.value === 'IoPay') {
metamaskButtonText.value = 'Connect MetaMask'
coinbaseButtonText.value = 'Connect Coinbase'
@@ -121,6 +120,17 @@ watchEffect(() => {
metamaskAccountsResult.value = 'Not Active'
coinbaseAccountsResult.value = 'Not Active'
ioPayAccountsResult.value = selectedAccount.value || 'Not Active'
+ phantomButtonText.value = 'Connect Phantom'
+ phantomAccountsResult.value = 'Not Active'
+ } else if (selectedProvider.value === 'Phantom') {
+ metamaskButtonText.value = 'Connect MetaMask'
+ coinbaseButtonText.value = 'Connect Coinbase'
+ ioPayButtonText.value = 'Connect ioPay'
+ phantomButtonText.value = 'Connected'
+ metamaskAccountsResult.value = 'Not Active'
+ coinbaseAccountsResult.value = 'Not Active'
+ ioPayAccountsResult.value = 'Not Active'
+ phantomAccountsResult.value = selectedAccount.value || 'Not Active'
}
})
@@ -168,6 +178,10 @@ button {
background-color: rgb(0, 0, 0);
}
+.phantom-btn {
+ background-color: purple;
+}
+
.connect-wallet-container {
display: flex;
flex-direction: column;
diff --git a/apps/web/src/types/ProviderString.ts b/apps/web/src/types/ProviderString.ts
index 547706e3e..c55573d90 100644
--- a/apps/web/src/types/ProviderString.ts
+++ b/apps/web/src/types/ProviderString.ts
@@ -4,4 +4,5 @@ export type ProviderString =
| 'IoPay'
| 'Ledger'
| 'WalletConnect'
+ | 'Phantom'
| ''
From 78f9faa7642e3bfc9ab2402217afee2ccde499a1 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 6 Oct 2022 20:05:15 -0500
Subject: [PATCH 24/40] Connect to phantom address working
---
apps/web/package.json | 2 +
apps/web/src/components/Wallet.vue | 6 +-
apps/web/src/composables/solana.ts | 41 ++
apps/web/src/composables/wallet.ts | 6 +
apps/web/src/interfaces/BrowserProviders.ts | 1 +
package-lock.json | 541 ++++++++++++++++++--
6 files changed, 562 insertions(+), 35 deletions(-)
create mode 100644 apps/web/src/composables/solana.ts
diff --git a/apps/web/package.json b/apps/web/package.json
index b631e69f2..3f58873c1 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -13,8 +13,10 @@
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
+ "@solana/web3.js": "^1.63.1",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
+ "borsh": "^0.7.0",
"buffer": "^6.0.3",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
diff --git a/apps/web/src/components/Wallet.vue b/apps/web/src/components/Wallet.vue
index a5467ef6c..a60e32a23 100644
--- a/apps/web/src/components/Wallet.vue
+++ b/apps/web/src/components/Wallet.vue
@@ -28,9 +28,6 @@
{{ ioPayAccountsResult }}
-
- Connect Ledger
-
{{ phantomButtonText }}
@@ -40,6 +37,9 @@
{{ phantomAccountsResult }}
+
+ Connect Ledger
+
WalletConnect
diff --git a/apps/web/src/composables/solana.ts b/apps/web/src/composables/solana.ts
new file mode 100644
index 000000000..756acb029
--- /dev/null
+++ b/apps/web/src/composables/solana.ts
@@ -0,0 +1,41 @@
+import { ref } from 'vue'
+import {
+ Connection,
+ Transaction,
+ SystemProgram,
+ PublicKey,
+} from '@solana/web3.js'
+import { BrowserProviders } from '@/interfaces/BrowserProviders'
+import { ProviderString } from '@/types/ProviderString'
+
+const defaultProviders = {
+ Phantom: undefined,
+}
+
+export default function useSolana() {
+ const solanaProviderList = ['Phantom']
+ const availableProviders = ref(getBrowserProviders())
+ const solanaPublicKey = ref({})
+
+ async function requestSolanaAddress(provider: ProviderString) {
+ const phantomProvider =
+ availableProviders.value[provider as keyof BrowserProviders]
+ const resp = await phantomProvider.connect()
+ solanaPublicKey.value = resp.publicKey
+ const address = resp.publicKey.toString()
+ return address
+ }
+
+ return { solanaProviderList, requestSolanaAddress }
+}
+
+function getBrowserProviders() {
+ const phantom: any = window.phantom?.solana?.isPhantom
+ ? window.phantom?.solana
+ : undefined
+ const providers = {
+ Phantom: undefined,
+ }
+ providers.Phantom = phantom
+ return providers
+}
\ No newline at end of file
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index d27131a78..84054a236 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -4,6 +4,7 @@ import useIoPay from '@/composables/iopay'
import useLedger from '@/composables/ledger'
import useEthers from '@/composables/ethers'
import useWalletConnect from '@/composables/walletConnect'
+import useSolana from '@/composables/solana'
import { ProviderString } from '@/types/ProviderString'
import { TransactionInit } from '@/interfaces/TransactionInit'
@@ -13,10 +14,12 @@ const {
disableWalletConnect,
sendWalletConnectTransaction,
} = useWalletConnect()
+const { solanaProviderList, requestSolanaAddress } = useSolana()
const amount = ref('0.001')
const toAddress = ref('0x728474D29c2F81eb17a669a7582A2C17f1042b57')
// Test ethereum send to address : 0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203
+// Test solana address: 7aVow9eVQjwn7Y4y7tAbPM1pfrE1TzjmJhxcRt8QwX5F
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
export default function useWallet() {
@@ -52,6 +55,9 @@ export default function useWallet() {
)
const address = accounts[0]
setSelectedAccount(address)
+ } else if (solanaProviderList.includes(provider)) {
+ const address = await requestSolanaAddress(provider as ProviderString)
+ setSelectedAccount(address)
} else if (provider === 'IoPay') {
const accounts = await getIoPayAccounts()
const { address } = accounts[0]
diff --git a/apps/web/src/interfaces/BrowserProviders.ts b/apps/web/src/interfaces/BrowserProviders.ts
index b624a0b3b..8acc95133 100644
--- a/apps/web/src/interfaces/BrowserProviders.ts
+++ b/apps/web/src/interfaces/BrowserProviders.ts
@@ -3,4 +3,5 @@ import { EthersProvider } from '@/interfaces/EthersProvider'
export interface BrowserProviders {
MetaMask?: EthersProvider
CoinbaseWallet?: EthersProvider
+ Phantom?: any // TODO: Fix this.
}
diff --git a/package-lock.json b/package-lock.json
index c38735518..6c16154d0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -58,8 +58,10 @@
"@ledgerhq/hw-app-eth": "^6.29.4",
"@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
+ "@solana/web3.js": "^1.63.1",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
+ "borsh": "^0.7.0",
"buffer": "^6.0.3",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
@@ -2579,7 +2581,6 @@
},
"node_modules/@babel/runtime": {
"version": "7.18.9",
- "dev": true,
"license": "MIT",
"dependencies": {
"regenerator-runtime": "^0.13.4"
@@ -5540,9 +5541,19 @@
"node": ">=4"
}
},
+ "node_modules/@noble/ed25519": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.1.tgz",
+ "integrity": "sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ]
+ },
"node_modules/@noble/hashes": {
"version": "1.1.2",
- "dev": true,
"funding": [
{
"type": "individual",
@@ -5553,7 +5564,6 @@
},
"node_modules/@noble/secp256k1": {
"version": "1.6.3",
- "dev": true,
"funding": [
{
"type": "individual",
@@ -6053,6 +6063,88 @@
"@sinonjs/commons": "^1.7.0"
}
},
+ "node_modules/@solana/buffer-layout": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz",
+ "integrity": "sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ==",
+ "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/web3.js": {
+ "version": "1.63.1",
+ "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.63.1.tgz",
+ "integrity": "sha512-wgEdGVK5FTS2zENxbcGSvKpGZ0jDS6BUdGu8Gn6ns0CzgJkK83u4ip3THSnBPEQ5i/jrqukg998BwV1H67+qiQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.12.5",
+ "@noble/ed25519": "^1.7.0",
+ "@noble/hashes": "^1.1.2",
+ "@noble/secp256k1": "^1.6.3",
+ "@solana/buffer-layout": "^4.0.0",
+ "bigint-buffer": "^1.1.5",
+ "bn.js": "^5.0.0",
+ "borsh": "^0.7.0",
+ "bs58": "^4.0.1",
+ "buffer": "6.0.1",
+ "fast-stable-stringify": "^1.0.0",
+ "jayson": "^3.4.4",
+ "node-fetch": "2",
+ "rpc-websockets": "^7.5.0",
+ "superstruct": "^0.14.2"
+ },
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
+ "node_modules/@solana/web3.js/node_modules/buffer": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.1.tgz",
+ "integrity": "sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ==",
+ "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/@solidity-parser/parser": {
"version": "0.14.3",
"dev": true,
@@ -6212,7 +6304,6 @@
},
"node_modules/@types/connect": {
"version": "3.4.35",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
@@ -8352,6 +8443,18 @@
"node": ">=0.6"
}
},
+ "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.0.0",
"license": "MIT",
@@ -8375,6 +8478,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/blakejs": {
"version": "1.1.0",
"license": "CC0-1.0"
@@ -8439,6 +8550,16 @@
"dev": true,
"license": "ISC"
},
+ "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",
"license": "MIT"
@@ -8684,7 +8805,6 @@
"hasInstallScript": true,
"license": "MIT",
"optional": true,
- "peer": true,
"dependencies": {
"node-gyp-build": "^4.3.0"
},
@@ -11014,6 +11134,17 @@
"dev": true,
"license": "MIT"
},
+ "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",
"license": "MIT",
@@ -11528,6 +11659,19 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "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/esbuild": {
"version": "0.14.54",
"dev": true,
@@ -13238,8 +13382,7 @@
"node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
- "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
- "dev": true
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"node_modules/events": {
"version": "3.3.0",
@@ -13705,6 +13848,14 @@
],
"license": "MIT"
},
+ "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",
"license": "MIT"
@@ -13744,6 +13895,11 @@
"dev": true,
"license": "MIT"
},
+ "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": "3.19.0",
"license": "MIT",
@@ -13801,6 +13957,11 @@
"node": "^10.12.0 || >=12.0.0"
}
},
+ "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/fill-range": {
"version": "7.0.1",
"dev": true,
@@ -25886,6 +26047,78 @@
"node": ">=8"
}
},
+ "node_modules/jayson": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.7.0.tgz",
+ "integrity": "sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ==",
+ "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",
+ "lodash": "^4.17.20",
+ "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/@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/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/jayson/node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/jayson/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/jest": {
"version": "26.6.3",
"dev": true,
@@ -28471,7 +28704,6 @@
},
"node_modules/jsonparse": {
"version": "1.3.1",
- "dev": true,
"engines": [
"node >= 0.2.0"
],
@@ -28479,7 +28711,6 @@
},
"node_modules/JSONStream": {
"version": "1.3.5",
- "dev": true,
"license": "(MIT OR Apache-2.0)",
"dependencies": {
"jsonparse": "^1.2.0",
@@ -29187,7 +29418,6 @@
},
"node_modules/lodash": {
"version": "4.17.21",
- "dev": true,
"license": "MIT"
},
"node_modules/lodash._reinterpolate": {
@@ -32956,7 +33186,6 @@
},
"node_modules/regenerator-runtime": {
"version": "0.13.9",
- "dev": true,
"license": "MIT"
},
"node_modules/regex-not": {
@@ -33696,6 +33925,53 @@
"estree-walker": "^0.6.1"
}
},
+ "node_modules/rpc-websockets": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.5.0.tgz",
+ "integrity": "sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ==",
+ "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/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/rpc-websockets/node_modules/ws": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
+ "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
+ "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/rsvp": {
"version": "4.8.5",
"dev": true,
@@ -35196,6 +35472,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "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": "5.5.0",
"license": "MIT",
@@ -35675,6 +35956,11 @@
"version": "0.0.1",
"dev": 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-extensions": {
"version": "1.9.0",
"dev": true,
@@ -35695,7 +35981,6 @@
},
"node_modules/through": {
"version": "2.3.8",
- "dev": true,
"license": "MIT"
},
"node_modules/through2": {
@@ -37336,7 +37621,6 @@
"hasInstallScript": true,
"license": "MIT",
"optional": true,
- "peer": true,
"dependencies": {
"node-gyp-build": "^4.3.0"
},
@@ -41493,7 +41777,6 @@
},
"@babel/runtime": {
"version": "7.18.9",
- "dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
@@ -42621,10 +42904,12 @@
"@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
"@rollup/plugin-inject": "^4.0.4",
+ "@solana/web3.js": "^1.63.1",
"@vitejs/plugin-vue": "^2.3.3",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"autoprefixer": "^10.4.7",
+ "borsh": "*",
"buffer": "^6.0.3",
"ethers": "^5.6.9",
"iotex-antenna": "^0.31.3",
@@ -44607,13 +44892,16 @@
"glob-to-regexp": "^0.3.0"
}
},
+ "@noble/ed25519": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.1.tgz",
+ "integrity": "sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw=="
+ },
"@noble/hashes": {
- "version": "1.1.2",
- "dev": true
+ "version": "1.1.2"
},
"@noble/secp256k1": {
- "version": "1.6.3",
- "dev": true
+ "version": "1.6.3"
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
@@ -45001,6 +45289,58 @@
"@sinonjs/commons": "^1.7.0"
}
},
+ "@solana/buffer-layout": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz",
+ "integrity": "sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ==",
+ "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"
+ }
+ }
+ }
+ },
+ "@solana/web3.js": {
+ "version": "1.63.1",
+ "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.63.1.tgz",
+ "integrity": "sha512-wgEdGVK5FTS2zENxbcGSvKpGZ0jDS6BUdGu8Gn6ns0CzgJkK83u4ip3THSnBPEQ5i/jrqukg998BwV1H67+qiQ==",
+ "requires": {
+ "@babel/runtime": "^7.12.5",
+ "@noble/ed25519": "^1.7.0",
+ "@noble/hashes": "^1.1.2",
+ "@noble/secp256k1": "^1.6.3",
+ "@solana/buffer-layout": "^4.0.0",
+ "bigint-buffer": "^1.1.5",
+ "bn.js": "^5.0.0",
+ "borsh": "^0.7.0",
+ "bs58": "^4.0.1",
+ "buffer": "6.0.1",
+ "fast-stable-stringify": "^1.0.0",
+ "jayson": "^3.4.4",
+ "node-fetch": "2",
+ "rpc-websockets": "^7.5.0",
+ "superstruct": "^0.14.2"
+ },
+ "dependencies": {
+ "buffer": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.1.tgz",
+ "integrity": "sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ==",
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ }
+ }
+ },
"@solidity-parser/parser": {
"version": "0.14.3",
"dev": true,
@@ -45119,7 +45459,6 @@
},
"@types/connect": {
"version": "3.4.35",
- "dev": true,
"requires": {
"@types/node": "*"
}
@@ -46595,6 +46934,14 @@
"big-integer": {
"version": "1.6.51"
},
+ "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.0.0"
},
@@ -46609,6 +46956,14 @@
"version": "2.2.0",
"dev": true
},
+ "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"
+ }
+ },
"blakejs": {
"version": "1.1.0"
},
@@ -46657,6 +47012,16 @@
"version": "1.0.0",
"dev": true
},
+ "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"
},
@@ -46834,7 +47199,6 @@
"bufferutil": {
"version": "4.0.6",
"optional": true,
- "peer": true,
"requires": {
"node-gyp-build": "^4.3.0"
}
@@ -48389,6 +48753,11 @@
"version": "1.0.0",
"dev": true
},
+ "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"
},
@@ -48747,6 +49116,19 @@
"is-symbol": "^1.0.2"
}
},
+ "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"
+ }
+ },
"esbuild": {
"version": "0.14.54",
"dev": true,
@@ -49761,8 +50143,7 @@
"eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
- "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
- "dev": true
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"events": {
"version": "3.3.0"
@@ -50081,6 +50462,11 @@
"extsprintf": {
"version": "1.3.0"
},
+ "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"
},
@@ -50111,6 +50497,11 @@
"version": "2.0.6",
"dev": true
},
+ "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": "3.19.0"
},
@@ -50148,6 +50539,11 @@
"flat-cache": "^3.0.4"
}
},
+ "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=="
+ },
"fill-range": {
"version": "7.0.1",
"dev": true,
@@ -59078,6 +59474,57 @@
"istanbul-lib-report": "^3.0.0"
}
},
+ "jayson": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.7.0.tgz",
+ "integrity": "sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ==",
+ "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",
+ "lodash": "^4.17.20",
+ "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=="
+ },
+ "@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": "*"
+ }
+ },
+ "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=="
+ },
+ "uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
+ },
+ "ws": {
+ "version": "7.5.9",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
+ "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
+ "requires": {}
+ }
+ }
+ },
"jest": {
"version": "26.6.3",
"dev": true,
@@ -60796,12 +61243,10 @@
}
},
"jsonparse": {
- "version": "1.3.1",
- "dev": true
+ "version": "1.3.1"
},
"JSONStream": {
"version": "1.3.5",
- "dev": true,
"requires": {
"jsonparse": "^1.2.0",
"through": ">=2.2.7 <3"
@@ -61248,8 +61693,7 @@
}
},
"lodash": {
- "version": "4.17.21",
- "dev": true
+ "version": "4.17.21"
},
"lodash._reinterpolate": {
"version": "3.0.0",
@@ -63780,8 +64224,7 @@
"dev": true
},
"regenerator-runtime": {
- "version": "0.13.9",
- "dev": true
+ "version": "0.13.9"
},
"regex-not": {
"version": "1.0.2",
@@ -64289,6 +64732,32 @@
"estree-walker": "^0.6.1"
}
},
+ "rpc-websockets": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.5.0.tgz",
+ "integrity": "sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ==",
+ "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": {
+ "uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
+ },
+ "ws": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
+ "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
+ "requires": {}
+ }
+ }
+ },
"rsvp": {
"version": "4.8.5",
"dev": true
@@ -65298,6 +65767,11 @@
"version": "3.1.1",
"dev": true
},
+ "superstruct": {
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz",
+ "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ=="
+ },
"supports-color": {
"version": "5.5.0",
"requires": {
@@ -65616,6 +66090,11 @@
"version": "0.0.1",
"dev": true
},
+ "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-extensions": {
"version": "1.9.0",
"dev": true
@@ -65629,8 +66108,7 @@
"dev": true
},
"through": {
- "version": "2.3.8",
- "dev": true
+ "version": "2.3.8"
},
"through2": {
"version": "3.0.2",
@@ -66661,7 +67139,6 @@
"utf-8-validate": {
"version": "5.0.9",
"optional": true,
- "peer": true,
"requires": {
"node-gyp-build": "^4.3.0"
}
From 15cf1c8c9837714f8ba61219c8f7581a1e254ae5 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 6 Oct 2022 20:38:26 -0500
Subject: [PATCH 25/40] Phantom sending transactions
---
apps/web/src/composables/solana.ts | 25 ++++++++++++++++++++++++-
apps/web/src/composables/wallet.ts | 11 +++++------
2 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/apps/web/src/composables/solana.ts b/apps/web/src/composables/solana.ts
index 756acb029..ccf1cbaf0 100644
--- a/apps/web/src/composables/solana.ts
+++ b/apps/web/src/composables/solana.ts
@@ -7,6 +7,7 @@ import {
} from '@solana/web3.js'
import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { ProviderString } from '@/types/ProviderString'
+import { TransactionInit } from '@/interfaces/TransactionInit'
const defaultProviders = {
Phantom: undefined,
@@ -26,7 +27,29 @@ export default function useSolana() {
return address
}
- return { solanaProviderList, requestSolanaAddress }
+ async function sendSolanaTransaction(provider: ProviderString, { from, to, value }: TransactionInit) {
+ const network = 'https://api.devnet.solana.com'
+ const connection = new Connection(network)
+ const { blockhash } = await connection.getLatestBlockhash('finalized')
+ const toAddress = new PublicKey(to)
+ const fromAddress = new PublicKey(from)
+ const lamports = Number(value) * 1000000000
+ const transaction = new Transaction().add(
+ SystemProgram.transfer({
+ fromPubkey: fromAddress,
+ toPubkey: toAddress,
+ lamports,
+ })
+ )
+ transaction.feePayer = fromAddress
+ transaction.recentBlockhash = blockhash
+ const { signature } = await availableProviders.value[provider as keyof BrowserProviders]
+ .signAndSendTransaction(transaction)
+ const signatureStatus = await connection.getSignatureStatus(signature)
+ return signatureStatus
+ }
+
+ return { solanaProviderList, requestSolanaAddress, sendSolanaTransaction }
}
function getBrowserProviders() {
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index 84054a236..f7ff22165 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -14,10 +14,10 @@ const {
disableWalletConnect,
sendWalletConnectTransaction,
} = useWalletConnect()
-const { solanaProviderList, requestSolanaAddress } = useSolana()
+const { solanaProviderList, requestSolanaAddress, sendSolanaTransaction } = useSolana()
const amount = ref('0.001')
-const toAddress = ref('0x728474D29c2F81eb17a669a7582A2C17f1042b57')
+const toAddress = ref('7aVow9eVQjwn7Y4y7tAbPM1pfrE1TzjmJhxcRt8QwX5F')
// Test ethereum send to address : 0xD4e5faa8aD7d499Aa03BDDE2a3116E66bc8F8203
// Test solana address: 7aVow9eVQjwn7Y4y7tAbPM1pfrE1TzjmJhxcRt8QwX5F
// Test iotex send to address: acc://06da5e904240736b1e21ca6dbbd5f619860803af04ff3d54/acme
@@ -85,10 +85,9 @@ export default function useWallet() {
if (provider === 'WalletConnect') {
await sendWalletConnectTransaction(tx.value)
} else if (ethersProviderList.includes(provider)) {
- await sendEthersTransaction(
- provider as ProviderString,
- tx.value
- )
+ await sendEthersTransaction(provider as ProviderString, tx.value)
+ } else if (solanaProviderList.includes(provider)) {
+ await sendSolanaTransaction(provider as ProviderString, tx.value)
} else if (selectedProvider.value === 'IoPay') {
await sendIoPayTransaction(tx.value)
} else if (selectedProvider.value === 'Ledger') {
From 00776ed49daa1c34aad8e014d9f1690e212a8c12 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Thu, 6 Oct 2022 20:39:51 -0500
Subject: [PATCH 26/40] Improve formatting
---
apps/web/src/composables/wallet.ts | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index f7ff22165..07544e707 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -50,9 +50,7 @@ export default function useWallet() {
if (provider === 'WalletConnect') {
enableWalletConnect()
} else if (ethersProviderList.includes(provider)) {
- const accounts = await requestEthersAccount(
- provider as ProviderString
- )
+ const accounts = await requestEthersAccount(provider as ProviderString)
const address = accounts[0]
setSelectedAccount(address)
} else if (solanaProviderList.includes(provider)) {
From 41d66a2715fe15758ed7739cd0b8523687bfc09f Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 13:20:31 -0500
Subject: [PATCH 27/40] Implement signSolanaMessage
---
apps/web/src/composables/solana.ts | 8 +++++++-
apps/web/src/composables/wallet.ts | 10 ++++------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/apps/web/src/composables/solana.ts b/apps/web/src/composables/solana.ts
index ccf1cbaf0..f945710a0 100644
--- a/apps/web/src/composables/solana.ts
+++ b/apps/web/src/composables/solana.ts
@@ -49,7 +49,13 @@ export default function useSolana() {
return signatureStatus
}
- return { solanaProviderList, requestSolanaAddress, sendSolanaTransaction }
+ async function signSolanaMessage(provider: ProviderString, message: string) {
+ const { signature } = await availableProviders.value[provider as keyof BrowserProviders]
+ .signMessage(message)
+ return signature
+ }
+
+ return { solanaProviderList, requestSolanaAddress, sendSolanaTransaction, signSolanaMessage }
}
function getBrowserProviders() {
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index 07544e707..e04e9007f 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -9,12 +9,8 @@ import { ProviderString } from '@/types/ProviderString'
import { TransactionInit } from '@/interfaces/TransactionInit'
const { ethersProviderList, requestEthersAccount, sendEthersTransaction, signEthersMessage } = useEthers()
-const {
- enableWalletConnect,
- disableWalletConnect,
- sendWalletConnectTransaction,
-} = useWalletConnect()
-const { solanaProviderList, requestSolanaAddress, sendSolanaTransaction } = useSolana()
+const { enableWalletConnect, disableWalletConnect, sendWalletConnectTransaction } = useWalletConnect()
+const { solanaProviderList, requestSolanaAddress, sendSolanaTransaction, signSolanaMessage } = useSolana()
const amount = ref('0.001')
const toAddress = ref('7aVow9eVQjwn7Y4y7tAbPM1pfrE1TzjmJhxcRt8QwX5F')
@@ -103,6 +99,8 @@ export default function useWallet() {
try {
if (ethersProviderList.includes(selectedProvider.value)) {
await signEthersMessage(selectedProvider.value, message)
+ } else if (solanaProviderList.includes(selectedProvider.value)) {
+ await signSolanaMessage(selectedProvider.value, message)
} else if (selectedProvider.value === 'IoPay') {
const hashedMessage = ethers.utils.id(message)
await signIoPayMessage(hashedMessage)
From 5314318519706795d59d55dac1b7f6ed16ccda78 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 13:20:48 -0500
Subject: [PATCH 28/40] Autoformat on save solana.ts
---
apps/web/src/composables/solana.ts | 102 ++++++++++++++---------------
1 file changed, 51 insertions(+), 51 deletions(-)
diff --git a/apps/web/src/composables/solana.ts b/apps/web/src/composables/solana.ts
index f945710a0..e68666c89 100644
--- a/apps/web/src/composables/solana.ts
+++ b/apps/web/src/composables/solana.ts
@@ -1,70 +1,70 @@
import { ref } from 'vue'
import {
- Connection,
- Transaction,
- SystemProgram,
- PublicKey,
+ Connection,
+ Transaction,
+ SystemProgram,
+ PublicKey,
} from '@solana/web3.js'
import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { ProviderString } from '@/types/ProviderString'
import { TransactionInit } from '@/interfaces/TransactionInit'
const defaultProviders = {
- Phantom: undefined,
+ Phantom: undefined,
}
export default function useSolana() {
- const solanaProviderList = ['Phantom']
- const availableProviders = ref(getBrowserProviders())
- const solanaPublicKey = ref({})
+ const solanaProviderList = ['Phantom']
+ const availableProviders = ref(getBrowserProviders())
+ const solanaPublicKey = ref({})
- async function requestSolanaAddress(provider: ProviderString) {
- const phantomProvider =
- availableProviders.value[provider as keyof BrowserProviders]
- const resp = await phantomProvider.connect()
- solanaPublicKey.value = resp.publicKey
- const address = resp.publicKey.toString()
- return address
- }
+ async function requestSolanaAddress(provider: ProviderString) {
+ const phantomProvider =
+ availableProviders.value[provider as keyof BrowserProviders]
+ const resp = await phantomProvider.connect()
+ solanaPublicKey.value = resp.publicKey
+ const address = resp.publicKey.toString()
+ return address
+ }
- async function sendSolanaTransaction(provider: ProviderString, { from, to, value }: TransactionInit) {
- const network = 'https://api.devnet.solana.com'
- const connection = new Connection(network)
- const { blockhash } = await connection.getLatestBlockhash('finalized')
- const toAddress = new PublicKey(to)
- const fromAddress = new PublicKey(from)
- const lamports = Number(value) * 1000000000
- const transaction = new Transaction().add(
- SystemProgram.transfer({
- fromPubkey: fromAddress,
- toPubkey: toAddress,
- lamports,
- })
- )
- transaction.feePayer = fromAddress
- transaction.recentBlockhash = blockhash
- const { signature } = await availableProviders.value[provider as keyof BrowserProviders]
- .signAndSendTransaction(transaction)
- const signatureStatus = await connection.getSignatureStatus(signature)
- return signatureStatus
- }
+ async function sendSolanaTransaction(provider: ProviderString, { from, to, value }: TransactionInit) {
+ const network = 'https://api.devnet.solana.com'
+ const connection = new Connection(network)
+ const { blockhash } = await connection.getLatestBlockhash('finalized')
+ const toAddress = new PublicKey(to)
+ const fromAddress = new PublicKey(from)
+ const lamports = Number(value) * 1000000000
+ const transaction = new Transaction().add(
+ SystemProgram.transfer({
+ fromPubkey: fromAddress,
+ toPubkey: toAddress,
+ lamports,
+ })
+ )
+ transaction.feePayer = fromAddress
+ transaction.recentBlockhash = blockhash
+ const { signature } = await availableProviders.value[provider as keyof BrowserProviders]
+ .signAndSendTransaction(transaction)
+ const signatureStatus = await connection.getSignatureStatus(signature)
+ return signatureStatus
+ }
- async function signSolanaMessage(provider: ProviderString, message: string) {
- const { signature } = await availableProviders.value[provider as keyof BrowserProviders]
- .signMessage(message)
- return signature
- }
+ async function signSolanaMessage(provider: ProviderString, message: string) {
+ const { signature } = await availableProviders.value[provider as keyof BrowserProviders]
+ .signMessage(message)
+ return signature
+ }
- return { solanaProviderList, requestSolanaAddress, sendSolanaTransaction, signSolanaMessage }
+ return { solanaProviderList, requestSolanaAddress, sendSolanaTransaction, signSolanaMessage }
}
function getBrowserProviders() {
- const phantom: any = window.phantom?.solana?.isPhantom
- ? window.phantom?.solana
- : undefined
- const providers = {
- Phantom: undefined,
- }
- providers.Phantom = phantom
- return providers
+ const phantom: any = window.phantom?.solana?.isPhantom
+ ? window.phantom?.solana
+ : undefined
+ const providers = {
+ Phantom: undefined,
+ }
+ providers.Phantom = phantom
+ return providers
}
\ No newline at end of file
From 1470cf59692cd897b40528869c5359945f902437 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Fri, 7 Oct 2022 14:26:52 -0400
Subject: [PATCH 29/40] More changes
---
common/data/src/index.ts | 16 +++++++++
common/helpers/src/index.ts | 6 ++--
services/crawler/src/index.ts | 20 +++++------
services/crawler/src/providers/Ethereum.ts | 42 +++++++++-------------
services/crawler/test/crawler.test.ts | 2 +-
5 files changed, 46 insertions(+), 40 deletions(-)
diff --git a/common/data/src/index.ts b/common/data/src/index.ts
index 97c57059a..7a21ced82 100644
--- a/common/data/src/index.ts
+++ b/common/data/src/index.ts
@@ -31,20 +31,36 @@ export function schemaToGlueColumns(jsonSchema: JsonSchema): glue.Column[] {
}
export type EventTableSchema = {
+ /** The name of the chain (e.g. iotex, ethereum) */
chain: string
+ /** The name of the network (e.g. mainnet, testnet) */
network: string
+ /** The node provider (e.g. casimir, infura, alchemy), */
provider: string
+ /** The type of event (e.g. block, transaction, deposit) */
type: string
+ /** The block height */
height: number
+ /** The block hash */
block: string
+ /** The transaction hash */
transaction: string
+ /** The date timestamp of the event in ISO 8601 format (e.g. 2015-03-04T22:44:30.652Z) */
created_at: string
+ /** The address which initiated the event, a miner in case of block and a caller in case of other events */
address: string
+ /** The recipient's address */
to_address: string
+ /** The validator's address */
validator: string
+ /** The list of validators' addresses */
validator_list: string[]
+ /** The amount value associated with the transaction */
amount: string
+ /** The duration of the event */
duration: number
+ /** Is auto staking enabled */
auto_stake: boolean
}
+
export { eventSchema, aggSchema }
\ No newline at end of file
diff --git a/common/helpers/src/index.ts b/common/helpers/src/index.ts
index 2f7ae52b9..86a09ddc8 100644
--- a/common/helpers/src/index.ts
+++ b/common/helpers/src/index.ts
@@ -2,7 +2,7 @@ import { S3Client, S3ClientConfig, PutObjectCommand, GetObjectCommand } from '@a
import { AthenaClient, AthenaClientConfig } from '@aws-sdk/client-athena'
import { defaultProvider } from '@aws-sdk/credential-provider-node'
import { StartQueryExecutionCommand, GetQueryExecutionCommand } from '@aws-sdk/client-athena'
-import { EventTableColumn } from '@casimir/data'
+import { EventTableSchema } from '@casimir/data'
const defaultQueryOutputBucket = 'casimir-etl-output-bucket-dev'
@@ -186,7 +186,7 @@ async function pollAthenaQueryOutput(queryId: string): Promise {
* @param query - SQL query to run (make sure the correct permissions are set)
* @return string - Query result
*/
-export async function queryAthena(query: string): Promise {
+export async function queryAthena(query: string): Promise {
if (!athena) {
athena = await newAthenaClient()
@@ -225,7 +225,7 @@ export async function queryAthena(query: string): Promise h.trim().replace(/"/g, ''))
- const events: EventTableColumn[] = []
+ const events: EventTableSchema[] = []
rows.forEach((curr, i) => {
const row = curr.split(',')
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index 6eddb0c8b..b0a4f0595 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -66,16 +66,16 @@ class Crawler {
for (let i = start; i < current.number; i++) {
const {events, blockHash} = await this.service.getEvents(15000000 + i)
- const ndjson = events.map((e: EventTableSchema) => JSON.stringify(e)).join('\n')
- await uploadToS3({
- bucket: eventOutputBucket,
- key: `${blockHash}-event.json`,
- data: ndjson
- }).finally(() => {
- if (this.config.verbose) {
- console.log(`uploaded events for block ${blockHash}`)
- }
- })
+ const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
+ // await uploadToS3({
+ // bucket: eventOutputBucket,
+ // key: `${blockHash}-event.json`,
+ // data: ndjson
+ // }).finally(() => {
+ // if (this.config.verbose) {
+ // console.log(`uploaded events for block ${blockHash}`)
+ // }
+ // })
}
return
}
diff --git a/services/crawler/src/providers/Ethereum.ts b/services/crawler/src/providers/Ethereum.ts
index b40707a10..418e6acb3 100644
--- a/services/crawler/src/providers/Ethereum.ts
+++ b/services/crawler/src/providers/Ethereum.ts
@@ -41,35 +41,30 @@ export class EthereumService {
return input
}
- async getEvents(height: number): Promise<{ blockHash: string, events: EventTableSchema[] }> {
- const events: EventTableSchema[] = []
+ async getEvents(height: number): Promise<{ blockHash: string, events: Partial[] }> {
+ const events: Partial[] = []
const block = await this.provider.getBlockWithTransactions(height)
- events.push({
+ const blockEvent = {
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
type: 'block',
block: block.hash,
- transaction: "",
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: block.miner,
height: block.number,
- to_address: "",
- validator: '',
- duration: 0,
- validator_list: [],
- amount: '0',
- auto_stake: false
- })
+ }
+
+ events.push(blockEvent)
if (block.transactions.length === 0) {
return { blockHash: block.hash, events }
}
for await (const tx of block.transactions) {
- events.push({
+ const txEvent = {
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
@@ -78,14 +73,12 @@ export class EthereumService {
transaction: tx.hash,
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: tx.from,
- to_address: tx.to || '',
+ to_address: tx.to,
height: block.number,
- validator: '',
- validator_list: [],
- duration: 0,
amount: tx.value.toString(),
- auto_stake: false
- })
+ }
+
+ events.push(txEvent)
const receipts = await this.provider.getTransactionReceipt(tx.hash)
@@ -93,11 +86,11 @@ export class EthereumService {
continue
}
- for (const log of receipts.logs) {
+ for await (const log of receipts.logs) {
if (log.address in BeaconDepositContract) {
const parsedLog = this.parseLog(log)
- console.log(parsedLog)
- const logEvent: EventTableSchema = {
+
+ const logEvent = {
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
@@ -107,13 +100,10 @@ export class EthereumService {
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: log.address,
height: block.number,
- to_address: '',
- validator: '',
- duration: 0,
- validator_list: [],
+ to_address: tx.to || '',
amount: parsedLog.amount.toString(),
- auto_stake: false
}
+
events.push(logEvent)
}
}
diff --git a/services/crawler/test/crawler.test.ts b/services/crawler/test/crawler.test.ts
index fa4766ed4..87b13436c 100644
--- a/services/crawler/test/crawler.test.ts
+++ b/services/crawler/test/crawler.test.ts
@@ -7,7 +7,7 @@ test('init crawler for ethereum', async () => {
const eth = await crawler({
chain: Chain.Ethereum,
options: {
- url: 'https://eth-mainnet.alchemyapi.io/v2/5zDQdGo96cD5RJSDuUcS9HktqFOBJH05',
+ url: 'https://eth-mainnet.alchemyapi.io/v2/5zDQdGo96cD5RJSDuUcS9HktqFOBJH05'
},
verbose: true
})
From eb8cec8fbb6c8b1557d8d0cef6662cdd34153456 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 14:26:24 -0500
Subject: [PATCH 30/40] Update const tx to no longer be a ref
---
apps/web/src/composables/wallet.ts | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index d27131a78..e792611f0 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -69,24 +69,24 @@ export default function useWallet() {
}
async function sendTransaction(provider: string) {
- const tx: Ref = ref({
+ const tx: TransactionInit = {
from: selectedAccount.value,
to: toAddress.value,
value: amount.value,
- })
+ }
try {
if (provider === 'WalletConnect') {
- await sendWalletConnectTransaction(tx.value)
+ await sendWalletConnectTransaction(tx)
} else if (ethersProviderList.includes(provider)) {
await sendEthersTransaction(
provider as ProviderString,
- tx.value
+ tx
)
} else if (selectedProvider.value === 'IoPay') {
- await sendIoPayTransaction(tx.value)
+ await sendIoPayTransaction(tx)
} else if (selectedProvider.value === 'Ledger') {
- await sendLedgerTransaction(tx.value)
+ await sendLedgerTransaction(tx)
} else {
throw new Error('Provider selected not yet supported')
}
From 4567ded95fc3abf1cc1f9b2f00b819c0282c186a Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 14:38:53 -0500
Subject: [PATCH 31/40] Add providerString as an attribute on the tx object
---
apps/web/src/composables/ethers.ts | 12 +++++-------
apps/web/src/composables/ledger.ts | 2 +-
apps/web/src/composables/wallet.ts | 14 ++++++--------
apps/web/src/interfaces/TransactionInit.ts | 4 ++++
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/apps/web/src/composables/ethers.ts b/apps/web/src/composables/ethers.ts
index e36f12458..62499ca54 100644
--- a/apps/web/src/composables/ethers.ts
+++ b/apps/web/src/composables/ethers.ts
@@ -3,6 +3,7 @@ import { ethers } from 'ethers'
import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { EthersProvider } from '@/interfaces/EthersProvider'
import { ProviderString } from '@/types/ProviderString'
+import { TransactionInit } from '@/interfaces/TransactionInit'
const defaultProviders = {
MetaMask: undefined,
@@ -10,15 +11,13 @@ const defaultProviders = {
}
const ethereum: any = window.ethereum
-const availableProviders = ref(
- getBrowserProviders(ethereum)
-)
+const availableProviders = ref(getBrowserProviders(ethereum))
export default function useEthers() {
const ethersProviderList = ['MetaMask', 'CoinbaseWallet']
async function requestEthersAccount(provider: ProviderString) {
const browserExtensionProvider =
- availableProviders.value[provider as keyof BrowserProviders]
+ availableProviders.value[provider as keyof BrowserProviders]
if (browserExtensionProvider?.request) {
return await browserExtensionProvider.request({
method: 'eth_requestAccounts',
@@ -27,8 +26,7 @@ export default function useEthers() {
}
async function sendEthersTransaction(
- providerString: ProviderString,
- { to, value }: { to: string; value: string }
+ { to, value, providerString }: TransactionInit
) {
const browserProvider =
availableProviders.value[providerString as keyof BrowserProviders]
@@ -47,7 +45,7 @@ export default function useEthers() {
async function signEthersMessage(provider: ProviderString, message: string) {
const browserProvider =
availableProviders.value[
- provider as keyof BrowserProviders
+ provider as keyof BrowserProviders
]
const web3Provider: ethers.providers.Web3Provider =
new ethers.providers.Web3Provider(browserProvider as EthersProvider)
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index 3456c8474..5f30e7593 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -43,7 +43,7 @@ export default function useLedger() {
// Todo check before click (user can +/- gas limit accordingly)
const gasEstimate = await provider.estimateGas(
unsignedTransaction as Deferrable
- )
+ )
const gasLimit = Math.ceil(parseInt(gasEstimate.toString()) * 1.3)
unsignedTransaction.gasLimit = ethers.utils.hexlify(gasLimit)
const balance = await provider.getBalance(from)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index e792611f0..c20692819 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -1,4 +1,4 @@
-import { Ref, ref } from 'vue'
+import { ref } from 'vue'
import { ethers } from 'ethers'
import useIoPay from '@/composables/iopay'
import useLedger from '@/composables/ledger'
@@ -68,21 +68,19 @@ export default function useWallet() {
}
}
- async function sendTransaction(provider: string) {
+ async function sendTransaction(providerString: ProviderString) {
const tx: TransactionInit = {
from: selectedAccount.value,
to: toAddress.value,
value: amount.value,
+ providerString
}
try {
- if (provider === 'WalletConnect') {
+ if (providerString === 'WalletConnect') {
await sendWalletConnectTransaction(tx)
- } else if (ethersProviderList.includes(provider)) {
- await sendEthersTransaction(
- provider as ProviderString,
- tx
- )
+ } else if (ethersProviderList.includes(providerString)) {
+ await sendEthersTransaction(tx)
} else if (selectedProvider.value === 'IoPay') {
await sendIoPayTransaction(tx)
} else if (selectedProvider.value === 'Ledger') {
diff --git a/apps/web/src/interfaces/TransactionInit.ts b/apps/web/src/interfaces/TransactionInit.ts
index 8ad38ce65..0d573490f 100644
--- a/apps/web/src/interfaces/TransactionInit.ts
+++ b/apps/web/src/interfaces/TransactionInit.ts
@@ -1,4 +1,6 @@
import ethers from 'ethers'
+import { ProviderString } from '@/types/ProviderString'
+
export interface TransactionInit extends ethers.providers.TransactionRequest {
/** The transaction sender's address */
from: string;
@@ -6,4 +8,6 @@ export interface TransactionInit extends ethers.providers.TransactionRequest {
to: string;
/** The value of the transaction */
value: string;
+ /** The optional provider of the transaction */
+ providerString?: ProviderString;
}
\ No newline at end of file
From e666d36af8450404237a3d7bf405cd988d347d0e Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 14:40:24 -0500
Subject: [PATCH 32/40] Update signLedgerMessage naming
---
apps/web/src/composables/ledger.ts | 4 ++--
apps/web/src/composables/wallet.ts | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index 5f30e7593..e75a37a08 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -80,7 +80,7 @@ export default function useLedger() {
return await provider.sendTransaction(signedTransaction)
}
- async function signMessageWithLedger(message: string) {
+ async function signLedgerMessage(message: string) {
const _eth = await getLedgerEthSigner()
const signature = await _eth.signPersonalMessage(
bip32Path,
@@ -94,7 +94,7 @@ export default function useLedger() {
return {
bip32Path,
getLedgerEthSigner,
- signMessageWithLedger,
+ signLedgerMessage,
sendLedgerTransaction,
}
}
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index c20692819..627ff4938 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -25,7 +25,7 @@ export default function useWallet() {
const {
bip32Path,
getLedgerEthSigner,
- signMessageWithLedger,
+ signLedgerMessage,
sendLedgerTransaction,
} = useLedger()
const selectedProvider = ref('')
@@ -102,7 +102,7 @@ export default function useWallet() {
const hashedMessage = ethers.utils.id(message)
await signIoPayMessage(hashedMessage)
} else if (selectedProvider.value === 'Ledger') {
- await signMessageWithLedger(message)
+ await signLedgerMessage(message)
} else {
console.log('signMessage not yet supported for this wallet provider')
}
From 5f985d950aec5b3a74c609366029fb702352b411 Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 15:38:23 -0500
Subject: [PATCH 33/40] Clean up signMessage with MessageInit interface
---
apps/web/src/composables/ethers.ts | 7 ++++---
apps/web/src/composables/iopay.ts | 10 ++++++----
apps/web/src/composables/ledger.ts | 6 ++++--
apps/web/src/composables/wallet.ts | 19 ++++++++++++-------
apps/web/src/composables/walletConnect.ts | 22 +++++++++++-----------
apps/web/src/interfaces/MessageInit.ts | 6 ++++++
6 files changed, 43 insertions(+), 27 deletions(-)
create mode 100644 apps/web/src/interfaces/MessageInit.ts
diff --git a/apps/web/src/composables/ethers.ts b/apps/web/src/composables/ethers.ts
index 62499ca54..a09c2d37d 100644
--- a/apps/web/src/composables/ethers.ts
+++ b/apps/web/src/composables/ethers.ts
@@ -4,6 +4,7 @@ import { BrowserProviders } from '@/interfaces/BrowserProviders'
import { EthersProvider } from '@/interfaces/EthersProvider'
import { ProviderString } from '@/types/ProviderString'
import { TransactionInit } from '@/interfaces/TransactionInit'
+import { MessageInit } from '@/interfaces/MessageInit'
const defaultProviders = {
MetaMask: undefined,
@@ -42,15 +43,15 @@ export default function useEthers() {
return hash
}
- async function signEthersMessage(provider: ProviderString, message: string) {
+ async function signEthersMessage(messageInit: MessageInit): Promise {
+ const { providerString, hashedMessage } = messageInit
const browserProvider =
availableProviders.value[
- provider as keyof BrowserProviders
+ providerString as keyof BrowserProviders
]
const web3Provider: ethers.providers.Web3Provider =
new ethers.providers.Web3Provider(browserProvider as EthersProvider)
const signer = web3Provider.getSigner()
- const hashedMessage = ethers.utils.id(message)
const signature = await signer.signMessage(hashedMessage)
return signature
}
diff --git a/apps/web/src/composables/iopay.ts b/apps/web/src/composables/iopay.ts
index 811170b28..a884dc806 100644
--- a/apps/web/src/composables/iopay.ts
+++ b/apps/web/src/composables/iopay.ts
@@ -2,6 +2,7 @@ import Antenna from 'iotex-antenna'
import { WsSignerPlugin } from 'iotex-antenna/lib/plugin/ws'
import { toRau } from 'iotex-antenna/lib/account/utils'
import { TransactionInit } from '@/interfaces/TransactionInit'
+import { MessageInit } from '@/interfaces/MessageInit'
export default function useIoPay() {
const signer = new WsSignerPlugin()
@@ -13,7 +14,7 @@ export default function useIoPay() {
return await signer.getAccounts()
}
- const sendIoPayTransaction = async ({to, value}: TransactionInit) => {
+ const sendIoPayTransaction = async ({ to, value }: TransactionInit) => {
try {
const transResp = await antenna?.iotx.sendTransfer({
to: `${to}`,
@@ -22,15 +23,16 @@ export default function useIoPay() {
gasLimit: '100000',
gasPrice: toRau('1', 'Qev'),
})
- console.log('transResp :>> ', transResp)
+ return transResp
} catch (err) {
// TODO: handle submit error and guide user
console.log(err)
}
}
- const signIoPayMessage = async (message: string) => {
- return await signer.signMessage(message)
+ const signIoPayMessage = async (messageInit: MessageInit): Promise => {
+ const { hashedMessage } = messageInit
+ return await signer.signMessage(hashedMessage)
}
// const stakeIoPay = async () => {
diff --git a/apps/web/src/composables/ledger.ts b/apps/web/src/composables/ledger.ts
index e75a37a08..5d5447884 100644
--- a/apps/web/src/composables/ledger.ts
+++ b/apps/web/src/composables/ledger.ts
@@ -5,6 +5,7 @@ import { ethers } from 'ethers'
import { TransactionInit } from '@/interfaces/TransactionInit'
import { Deferrable } from '@ethersproject/properties'
import { TransactionRequest } from '@ethersproject/abstract-provider'
+import { MessageInit } from '@/interfaces/MessageInit'
export default function useLedger() {
const bip32Path = '44\'/60\'/0\'/0/0'
@@ -80,11 +81,12 @@ export default function useLedger() {
return await provider.sendTransaction(signedTransaction)
}
- async function signLedgerMessage(message: string) {
+ async function signLedgerMessage(messageInit: MessageInit): Promise {
+ const { hashedMessage } = messageInit
const _eth = await getLedgerEthSigner()
const signature = await _eth.signPersonalMessage(
bip32Path,
- Buffer.from(message).toString('hex')
+ Buffer.from(hashedMessage).toString('hex')
)
const signedHash =
'0x' + signature.r + signature.s + signature.v.toString(16)
diff --git a/apps/web/src/composables/wallet.ts b/apps/web/src/composables/wallet.ts
index 627ff4938..98eb37e48 100644
--- a/apps/web/src/composables/wallet.ts
+++ b/apps/web/src/composables/wallet.ts
@@ -6,6 +6,7 @@ import useEthers from '@/composables/ethers'
import useWalletConnect from '@/composables/walletConnect'
import { ProviderString } from '@/types/ProviderString'
import { TransactionInit } from '@/interfaces/TransactionInit'
+import { MessageInit } from '@/interfaces/MessageInit'
const { ethersProviderList, requestEthersAccount, sendEthersTransaction, signEthersMessage } = useEthers()
const {
@@ -47,9 +48,7 @@ export default function useWallet() {
if (provider === 'WalletConnect') {
enableWalletConnect()
} else if (ethersProviderList.includes(provider)) {
- const accounts = await requestEthersAccount(
- provider as ProviderString
- )
+ const accounts = await requestEthersAccount(provider as ProviderString)
const address = accounts[0]
setSelectedAccount(address)
} else if (provider === 'IoPay') {
@@ -94,15 +93,19 @@ export default function useWallet() {
}
async function signMessage(message: string) {
+ const hashedMessage = ethers.utils.id(message)
+ const messageInit: MessageInit = {
+ hashedMessage,
+ providerString: selectedProvider.value,
+ }
// TODO: Mock sending hash and signature to backend for verification
try {
if (ethersProviderList.includes(selectedProvider.value)) {
- await signEthersMessage(selectedProvider.value, message)
+ await signEthersMessage(messageInit)
} else if (selectedProvider.value === 'IoPay') {
- const hashedMessage = ethers.utils.id(message)
- await signIoPayMessage(hashedMessage)
+ await signIoPayMessage(messageInit)
} else if (selectedProvider.value === 'Ledger') {
- await signLedgerMessage(message)
+ await signLedgerMessage(messageInit)
} else {
console.log('signMessage not yet supported for this wallet provider')
}
@@ -121,3 +124,5 @@ export default function useWallet() {
signMessage,
}
}
+
+
diff --git a/apps/web/src/composables/walletConnect.ts b/apps/web/src/composables/walletConnect.ts
index f11b026e1..907f4e673 100644
--- a/apps/web/src/composables/walletConnect.ts
+++ b/apps/web/src/composables/walletConnect.ts
@@ -5,17 +5,17 @@ import { ethers } from 'ethers'
import { TransactionInit } from '@/interfaces/TransactionInit'
export default function useWalletConnect() {
- const connector: Ref = ref()
+ let connector: WalletConnect | undefined
const walletConnectAddress: Ref = ref('')
function enableWalletConnect() {
- connector.value = new WalletConnect({
+ connector = new WalletConnect({
bridge: 'https://bridge.walletconnect.org', // Required
qrcodeModal: QRCodeModal,
})
- if (!connector.value.connected) {
- connector.value.createSession()
+ if (!connector.connected) {
+ connector.createSession()
}
- connector.value.on('connect', (error: any, payload: any) => {
+ connector.on('connect', (error: any, payload: any) => {
if (error) {
throw error
}
@@ -23,21 +23,21 @@ export default function useWalletConnect() {
const { accounts, chainId } = payload.params[0]
walletConnectAddress.value = accounts[0]
})
- connector.value.on('session_update', (error: any, payload: any) => {
+ connector.on('session_update', (error: any, payload: any) => {
if (error) {
throw error
}
// Get updated accounts and chainId
const { accounts, chainId } = payload.params[0]
})
- connector.value.on('disconnect', (error: any) => {
+ connector.on('disconnect', (error: any) => {
if (error) {
console.log(`disconnect error :>> ${error}`)
// throw error
}
// Delete connector
try {
- connector.value?.killSession()
+ connector?.killSession()
} catch (error) {
console.log(`disconnect error in listener :>> ${error}`)
}
@@ -46,7 +46,7 @@ export default function useWalletConnect() {
}
async function sendWalletConnectTransaction(
- {to, value}: TransactionInit
+ { to, value }: TransactionInit
) {
const amountInWei = ethers.utils.parseEther(value).toString()
// TODO: Better understand and handle gasPrice and gasLimit
@@ -61,7 +61,7 @@ export default function useWalletConnect() {
// nonce: 'nonce', // TODO: Use ethers to get nonce for current address
}
try {
- const result = await connector.value?.sendTransaction(tx)
+ const result = await connector?.sendTransaction(tx)
console.log('result :>> ', result)
} catch (err) {
console.log('error in sendWalletConnectTransaction :>> ', err)
@@ -70,7 +70,7 @@ export default function useWalletConnect() {
async function disableWalletConnect() {
try {
- await connector.value?.killSession()
+ await connector?.killSession()
} catch (err) {
console.log('error in disableWalletConnect :>> ', err)
}
diff --git a/apps/web/src/interfaces/MessageInit.ts b/apps/web/src/interfaces/MessageInit.ts
new file mode 100644
index 000000000..e01d22daa
--- /dev/null
+++ b/apps/web/src/interfaces/MessageInit.ts
@@ -0,0 +1,6 @@
+import { ProviderString } from '@/types/ProviderString'
+
+export interface MessageInit {
+ hashedMessage: string;
+ providerString: ProviderString;
+}
\ No newline at end of file
From 9d1c9c5f15799d36acc90acb7b13b0bb1252446d Mon Sep 17 00:00:00 2001
From: Christopher Cali
Date: Fri, 7 Oct 2022 15:43:51 -0500
Subject: [PATCH 34/40] Clean up walletConnect.ts with appropriate interface
---
apps/web/src/composables/iopay.ts | 2 +-
apps/web/src/composables/walletConnect.ts | 9 ++-------
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/apps/web/src/composables/iopay.ts b/apps/web/src/composables/iopay.ts
index a884dc806..a5aa74900 100644
--- a/apps/web/src/composables/iopay.ts
+++ b/apps/web/src/composables/iopay.ts
@@ -30,7 +30,7 @@ export default function useIoPay() {
}
}
- const signIoPayMessage = async (messageInit: MessageInit): Promise => {
+ const signIoPayMessage = async (messageInit: MessageInit): Promise => {
const { hashedMessage } = messageInit
return await signer.signMessage(hashedMessage)
}
diff --git a/apps/web/src/composables/walletConnect.ts b/apps/web/src/composables/walletConnect.ts
index 907f4e673..26a901a3d 100644
--- a/apps/web/src/composables/walletConnect.ts
+++ b/apps/web/src/composables/walletConnect.ts
@@ -47,7 +47,7 @@ export default function useWalletConnect() {
async function sendWalletConnectTransaction(
{ to, value }: TransactionInit
- ) {
+ ): Promise {
const amountInWei = ethers.utils.parseEther(value).toString()
// TODO: Better understand and handle gasPrice and gasLimit
const gasLimit = ethers.utils.hexlify(21000).toString()
@@ -60,12 +60,7 @@ export default function useWalletConnect() {
value: amountInWei,
// nonce: 'nonce', // TODO: Use ethers to get nonce for current address
}
- try {
- const result = await connector?.sendTransaction(tx)
- console.log('result :>> ', result)
- } catch (err) {
- console.log('error in sendWalletConnectTransaction :>> ', err)
- }
+ return await connector?.sendTransaction(tx)
}
async function disableWalletConnect() {
From f1d3175c3b93b90b788743561d63b92114f8378e Mon Sep 17 00:00:00 2001
From: Shane Earley
Date: Fri, 7 Oct 2022 17:01:25 -0400
Subject: [PATCH 35/40] Uninstall @ledgerhq/hw-transport-webhid
---
apps/web/package.json | 1 -
package-lock.json | 21 ---------------------
2 files changed, 22 deletions(-)
diff --git a/apps/web/package.json b/apps/web/package.json
index b631e69f2..133da9895 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -11,7 +11,6 @@
"dependencies": {
"@heroicons/vue": "^1.0.6",
"@ledgerhq/hw-app-eth": "^6.29.4",
- "@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
diff --git a/package-lock.json b/package-lock.json
index 1ec497d38..b4b9989d7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,7 +55,6 @@
"dependencies": {
"@heroicons/vue": "^1.0.6",
"@ledgerhq/hw-app-eth": "^6.29.4",
- "@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
"@walletconnect/client": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
@@ -5297,16 +5296,6 @@
"@ledgerhq/logs": "^6.10.1-nightly.0"
}
},
- "node_modules/@ledgerhq/hw-transport-webhid": {
- "version": "6.27.2",
- "license": "Apache-2.0",
- "dependencies": {
- "@ledgerhq/devices": "^7.0.0",
- "@ledgerhq/errors": "^6.10.1",
- "@ledgerhq/hw-transport": "^6.27.2",
- "@ledgerhq/logs": "^6.10.0"
- }
- },
"node_modules/@ledgerhq/hw-transport-webusb": {
"version": "6.27.6",
"resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.6.tgz",
@@ -40915,7 +40904,6 @@
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@heroicons/vue": "^1.0.6",
"@ledgerhq/hw-app-eth": "^6.29.4",
- "@ledgerhq/hw-transport-webhid": "^6.27.2",
"@ledgerhq/hw-transport-webusb": "^6.27.4",
"@rollup/plugin-inject": "^4.0.4",
"@vitejs/plugin-vue": "^2.3.3",
@@ -42675,15 +42663,6 @@
"@ledgerhq/logs": "^6.10.1-nightly.0"
}
},
- "@ledgerhq/hw-transport-webhid": {
- "version": "6.27.2",
- "requires": {
- "@ledgerhq/devices": "^7.0.0",
- "@ledgerhq/errors": "^6.10.1",
- "@ledgerhq/hw-transport": "^6.27.2",
- "@ledgerhq/logs": "^6.10.0"
- }
- },
"@ledgerhq/hw-transport-webusb": {
"version": "6.27.6",
"resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.6.tgz",
From 1f98d14aae097e968e6b649bd6b4b466fb89b9c6 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Sat, 8 Oct 2022 12:29:31 -0400
Subject: [PATCH 36/40] Update schema
---
common/data/src/index.ts | 18 ++++++++----
common/data/src/schemas/event.schema.json | 24 +++++++++++++---
services/crawler/src/index.ts | 32 ++++++++++++----------
services/crawler/src/providers/Ethereum.ts | 22 ++++++++++-----
4 files changed, 66 insertions(+), 30 deletions(-)
diff --git a/common/data/src/index.ts b/common/data/src/index.ts
index 7a21ced82..aed5e4ff3 100644
--- a/common/data/src/index.ts
+++ b/common/data/src/index.ts
@@ -31,11 +31,11 @@ export function schemaToGlueColumns(jsonSchema: JsonSchema): glue.Column[] {
}
export type EventTableSchema = {
- /** The name of the chain (e.g. iotex, ethereum) */
+ /** Name of the chain (e.g. iotex, ethereum) */
chain: string
- /** The name of the network (e.g. mainnet, testnet) */
+ /** Name of the network (e.g. mainnet, testnet) */
network: string
- /** The node provider (e.g. casimir, infura, alchemy), */
+ /** "Name of the provider (e.g. casimir, infura, alchemy) */
provider: string
/** The type of event (e.g. block, transaction, deposit) */
type: string
@@ -51,12 +51,20 @@ export type EventTableSchema = {
address: string
/** The recipient's address */
to_address: string
+ /** The amount value associated with the transaction */
+ amount: string
+ /** The total amount of gas used */
+ gasUsed: number
+ /** The gas limit provided by transactions in the block */
+ gasLimit: string
+ /** Post-London upgrade this represents the minimum gasUsed multiplier required for a transaction to be included in a block */
+ baseFee: string
+ /** Post-London Upgrade, this represents the part of the tx fee that is burnt */
+ burntFee: string
/** The validator's address */
validator: string
/** The list of validators' addresses */
validator_list: string[]
- /** The amount value associated with the transaction */
- amount: string
/** The duration of the event */
duration: number
/** Is auto staking enabled */
diff --git a/common/data/src/schemas/event.schema.json b/common/data/src/schemas/event.schema.json
index 87a458584..9ba6cad74 100644
--- a/common/data/src/schemas/event.schema.json
+++ b/common/data/src/schemas/event.schema.json
@@ -44,6 +44,26 @@
"type": "string",
"description": "The recipient's address"
},
+ "amount": {
+ "type": "string",
+ "description": "The amount of currency associated with the event"
+ },
+ "gas_used": {
+ "type": "string",
+ "description": "The total amount of gas used"
+ },
+ "gas_limit": {
+ "type": "string",
+ "description": "The gas limit provided by transactions in the block"
+ },
+ "base_fee": {
+ "type": "string",
+ "description": "Post-London upgrade this represents the minimum gasUsed multiplier required for a transaction to be included in a block"
+ },
+ "burnt_fee": {
+ "type": "string",
+ "description": "Post-London Upgrade, this represents the part of the tx fee that is burnt"
+ },
"validator": {
"type": "string",
"description": "The validator's address"
@@ -52,10 +72,6 @@
"type": "array",
"description": "The list of validators in stake action"
},
- "amount": {
- "type": "string",
- "description": "The amount of currency associated with the event"
- },
"duration":{
"type": "string",
"description": "The duration of the event"
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index b0a4f0595..fbf713725 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -54,19 +54,23 @@ class Crawler {
async start(): Promise {
if (this.service instanceof EthereumService) {
- const lastEvent = await this.getLastProcessedEvent()
- const last = lastEvent !== null ? lastEvent.height : 0
- const start = parseInt(last.toString()) + 1
-
- if (this.config.verbose) {
- console.log(`crawling ${this.config.chain} from block ${start}`)
- }
-
- const current = await this.service.getCurrentBlock()
-
- for (let i = start; i < current.number; i++) {
- const {events, blockHash} = await this.service.getEvents(15000000 + i)
- const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
+ // const lastEvent = await this.getLastProcessedEvent()
+ // const last = lastEvent !== null ? lastEvent.height : 0
+ // const start = parseInt(last.toString()) + 1
+ //
+ // if (this.config.verbose) {
+ // console.log(`crawling ${this.config.chain} from block ${start}`)
+ // }
+ //
+ // const current = await this.service.getCurrentBlock()
+
+ const { events, blockHash } = await this.service.getEvents(15697244)
+ const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
+ fs.writeFileSync('./test-events.json', ndjson)
+
+ // for (let i = start; i < current.number; i++) {
+ // const { events, blockHash } = await this.service.getEvents(15697244 + i)
+ // const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
// await uploadToS3({
// bucket: eventOutputBucket,
// key: `${blockHash}-event.json`,
@@ -76,7 +80,7 @@ class Crawler {
// console.log(`uploaded events for block ${blockHash}`)
// }
// })
- }
+ // }
return
}
diff --git a/services/crawler/src/providers/Ethereum.ts b/services/crawler/src/providers/Ethereum.ts
index 418e6acb3..7aff865ae 100644
--- a/services/crawler/src/providers/Ethereum.ts
+++ b/services/crawler/src/providers/Ethereum.ts
@@ -2,8 +2,9 @@ import { ethers } from 'ethers'
import { EventTableSchema } from '@casimir/data'
import { Chain, Provider } from '../index'
-const BeaconDepositContract = {
- '0x00000000219ab540356cBB839Cbe05303d7705Fa': {
+const ContractsOfInterest = {
+ BeaconDepositContract: {
+ hash: '0x00000000219ab540356cBB839Cbe05303d7705Fa',
abi: ['event DepositEvent (bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index)']
}
}
@@ -27,7 +28,7 @@ export class EthereumService {
}
parseLog(log: ethers.providers.Log): Record {
- const abi = BeaconDepositContract[log.address as keyof typeof BeaconDepositContract].abi
+ const abi = ContractsOfInterest[log.address as keyof typeof ContractsOfInterest].abi
const contractInterface = new ethers.utils.Interface(abi)
const parsedLog = contractInterface.parseLog(log)
const args = parsedLog.args.slice(-1 * parsedLog.eventFragment.inputs.length)
@@ -55,8 +56,14 @@ export class EthereumService {
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: block.miner,
height: block.number,
+ gasFee: block.gasUsed.toString(),
+ gasLimit: block.gasLimit.toString(),
+ gasUsed: block.gasUsed.toNumber(),
+
}
+ console.log("blockEvent", blockEvent)
+
events.push(blockEvent)
if (block.transactions.length === 0) {
@@ -87,23 +94,24 @@ export class EthereumService {
}
for await (const log of receipts.logs) {
- if (log.address in BeaconDepositContract) {
+ if (log.address in ContractsOfInterest) {
const parsedLog = this.parseLog(log)
+ const value = Buffer.from(parsedLog.amount.slice(2), 'hex').readBigUInt64BE(0).toString()
+ console.log('Parsed Log', parsedLog)
const logEvent = {
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
type: 'deposit',
block: block.hash,
- transaction: tx.hash,
+ transaction: log.transactionHash,
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: log.address,
height: block.number,
to_address: tx.to || '',
- amount: parsedLog.amount.toString(),
+ amount: value,
}
-
events.push(logEvent)
}
}
From b68e45f80de6874ba4f734c153d487622c74ccf7 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Mon, 10 Oct 2022 12:00:28 -0400
Subject: [PATCH 37/40] Quick fix
---
common/data/src/index.ts | 6 ++--
common/data/src/schemas/event.schema.json | 8 ++---
services/crawler/src/index.ts | 4 +--
services/crawler/src/providers/Ethereum.ts | 42 +++++++++++++++-------
services/crawler/src/providers/Iotex.ts | 14 ++++----
5 files changed, 46 insertions(+), 28 deletions(-)
diff --git a/common/data/src/index.ts b/common/data/src/index.ts
index aed5e4ff3..a09454fdc 100644
--- a/common/data/src/index.ts
+++ b/common/data/src/index.ts
@@ -56,11 +56,11 @@ export type EventTableSchema = {
/** The total amount of gas used */
gasUsed: number
/** The gas limit provided by transactions in the block */
- gasLimit: string
+ gasLimit: number
/** Post-London upgrade this represents the minimum gasUsed multiplier required for a transaction to be included in a block */
- baseFee: string
+ baseFee: number
/** Post-London Upgrade, this represents the part of the tx fee that is burnt */
- burntFee: string
+ burntFee: number
/** The validator's address */
validator: string
/** The list of validators' addresses */
diff --git a/common/data/src/schemas/event.schema.json b/common/data/src/schemas/event.schema.json
index 9ba6cad74..1261aaec6 100644
--- a/common/data/src/schemas/event.schema.json
+++ b/common/data/src/schemas/event.schema.json
@@ -49,19 +49,19 @@
"description": "The amount of currency associated with the event"
},
"gas_used": {
- "type": "string",
+ "type": "bigint",
"description": "The total amount of gas used"
},
"gas_limit": {
- "type": "string",
+ "type": "bigint",
"description": "The gas limit provided by transactions in the block"
},
"base_fee": {
- "type": "string",
+ "type": "bigint",
"description": "Post-London upgrade this represents the minimum gasUsed multiplier required for a transaction to be included in a block"
},
"burnt_fee": {
- "type": "string",
+ "type": "float",
"description": "Post-London Upgrade, this represents the part of the tx fee that is burnt"
},
"validator": {
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index fbf713725..dd3a35acf 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -66,8 +66,6 @@ class Crawler {
const { events, blockHash } = await this.service.getEvents(15697244)
const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
- fs.writeFileSync('./test-events.json', ndjson)
-
// for (let i = start; i < current.number; i++) {
// const { events, blockHash } = await this.service.getEvents(15697244 + i)
// const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
@@ -99,7 +97,7 @@ class Crawler {
for (let i = start; i < currentHeight; i++) {
const { hash, events } = await this.service.getEvents(i)
- const ndjson = events.map((e: EventTableSchema) => JSON.stringify(e)).join('\n')
+ const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
await uploadToS3({
bucket: eventOutputBucket,
diff --git a/services/crawler/src/providers/Ethereum.ts b/services/crawler/src/providers/Ethereum.ts
index 7aff865ae..2a5d6673f 100644
--- a/services/crawler/src/providers/Ethereum.ts
+++ b/services/crawler/src/providers/Ethereum.ts
@@ -56,14 +56,15 @@ export class EthereumService {
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: block.miner,
height: block.number,
- gasFee: block.gasUsed.toString(),
- gasLimit: block.gasLimit.toString(),
gasUsed: block.gasUsed.toNumber(),
-
+ gasLimit: block.gasLimit.toNumber(),
+ // @ts-ignore
+ baseFee: block.baseFeePerGas.toNumber(),
+ // @ts-ignore
+ burntFee: parseFloat(ethers.utils.formatEther(ethers.BigNumber.from(block.gasUsed).mul(block.baseFeePerGas))),
}
- console.log("blockEvent", blockEvent)
-
+ console.log('Block Event', blockEvent)
events.push(blockEvent)
if (block.transactions.length === 0) {
@@ -82,10 +83,10 @@ export class EthereumService {
address: tx.from,
to_address: tx.to,
height: block.number,
- amount: tx.value.toString(),
+ amount: ethers.utils.formatEther(tx.value.toString())
}
- events.push(txEvent)
+ console.log('Tx Event', txEvent)
const receipts = await this.provider.getTransactionReceipt(tx.hash)
@@ -96,10 +97,9 @@ export class EthereumService {
for await (const log of receipts.logs) {
if (log.address in ContractsOfInterest) {
const parsedLog = this.parseLog(log)
- const value = Buffer.from(parsedLog.amount.slice(2), 'hex').readBigUInt64BE(0).toString()
+ // const value = Buffer.from(parsedLog.amount.slice(2), 'hex').readBigUInt64BE(0).toString()
- console.log('Parsed Log', parsedLog)
- const logEvent = {
+ const deposit = {
chain: this.chain,
network: this.network,
provider: Provider.Casimir,
@@ -110,10 +110,28 @@ export class EthereumService {
address: log.address,
height: block.number,
to_address: tx.to || '',
- amount: value,
+ // amount: value,
}
- events.push(logEvent)
+
+ console.log('Deposit', deposit)
+ events.push(deposit)
+ continue
+ }
+
+ const logEvent = {
+ chain: this.chain,
+ network: this.network,
+ provider: Provider.Casimir,
+ type: 'log',
+ block: block.hash,
+ transaction: log.transactionHash,
+ created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
+ address: log.address,
+ height: block.number,
+ to_address: tx.to || '',
+ amount: tx.value.toString(),
}
+ events.push(logEvent)
}
}
return {
diff --git a/services/crawler/src/providers/Iotex.ts b/services/crawler/src/providers/Iotex.ts
index a42b0ea11..f085f69aa 100644
--- a/services/crawler/src/providers/Iotex.ts
+++ b/services/crawler/src/providers/Iotex.ts
@@ -115,14 +115,14 @@ export class IotexService {
})
}
- async getEvents(height: number): Promise<{ hash: string, events: EventTableSchema[]}> {
- const events: EventTableSchema[] = []
+ async getEvents(height: number): Promise<{ hash: string, events: Partial[]}> {
+ const events: Partial[] = []
const block = await this.provider.iotx.getBlockMetas({byIndex: {start: height, count: 1}})
const blockMeta = block.blkMetas[0]
- events.push({
+ const blockEvent = {
block: blockMeta.hash,
transaction: "",
chain: this.chain,
@@ -136,9 +136,11 @@ export class IotexService {
validator: '',
duration: 0,
validator_list: [],
- amount: '0',
+ amount: 0,
auto_stake: false
- })
+ }
+
+
const numOfActions = block.blkMetas[0].numActions
@@ -169,7 +171,7 @@ export class IotexService {
}
if (actionType === IotexActionType.transfer && actionCore.transfer) {
- actionEvent.amount = actionCore.transfer.amount
+ actionEvent.amount = parseInt(actionCore.transfer.amount).toString()
actionEvent.to_address = actionCore.transfer.recipient
events.push(actionEvent as EventTableSchema)
}
From 9bc0ed53012b58d95deb5b1835cd4c7f1f31e9e3 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Tue, 11 Oct 2022 13:58:25 -0400
Subject: [PATCH 38/40] Get contract of interest logs
---
services/crawler/src/index.ts | 38 +++++++++---------
services/crawler/src/providers/Ethereum.ts | 45 ++++++++--------------
services/crawler/test/crawler.test.ts | 3 --
3 files changed, 35 insertions(+), 51 deletions(-)
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index dd3a35acf..882f8f511 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -2,7 +2,7 @@ import { EventTableSchema } from '@casimir/data'
import {IotexNetworkType, IotexService, IotexServiceOptions, newIotexService} from './providers/Iotex'
import {EthereumService, EthereumServiceOptions, newEthereumService} from './providers/Ethereum'
import { queryAthena, uploadToS3 } from '@casimir/helpers'
-import fs from 'fs'
+import * as fs from "fs";
export enum Chain {
Ethereum = 'ethereum',
@@ -32,7 +32,11 @@ class Crawler {
async setup(): Promise {
if (this.config.chain === Chain.Ethereum) {
- this.service = await newEthereumService({ url: this.config?.options?.url || process.env.PUBLIC_ETHEREUM_RPC_URL || 'http://localhost:8545' })
+ try {
+ this.service = await newEthereumService({ url: this.config?.options?.url || process.env.PUBLIC_ETHEREUM_RPC_URL || 'http://localhost:8545' })
+ } catch (err) {
+ throw new Error(`failed to setup ethereum service: ${err}`)
+ }
return
}
@@ -54,21 +58,19 @@ class Crawler {
async start(): Promise {
if (this.service instanceof EthereumService) {
- // const lastEvent = await this.getLastProcessedEvent()
- // const last = lastEvent !== null ? lastEvent.height : 0
- // const start = parseInt(last.toString()) + 1
- //
- // if (this.config.verbose) {
- // console.log(`crawling ${this.config.chain} from block ${start}`)
- // }
- //
- // const current = await this.service.getCurrentBlock()
-
- const { events, blockHash } = await this.service.getEvents(15697244)
- const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
- // for (let i = start; i < current.number; i++) {
- // const { events, blockHash } = await this.service.getEvents(15697244 + i)
- // const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
+ const lastEvent = await this.getLastProcessedEvent()
+ const last = lastEvent !== null ? lastEvent.height : 0
+ const start = parseInt(last.toString()) + 1
+
+ if (this.config.verbose) {
+ console.log(`crawling ${this.config.chain} from block ${start}`)
+ }
+
+ const current = await this.service.getCurrentBlock()
+
+ for (let i = start; i < current.number; i++) {
+ const { events, blockHash } = await this.service.getEvents(i)
+ const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
// await uploadToS3({
// bucket: eventOutputBucket,
// key: `${blockHash}-event.json`,
@@ -78,7 +80,7 @@ class Crawler {
// console.log(`uploaded events for block ${blockHash}`)
// }
// })
- // }
+ }
return
}
diff --git a/services/crawler/src/providers/Ethereum.ts b/services/crawler/src/providers/Ethereum.ts
index 2a5d6673f..fe6d4f135 100644
--- a/services/crawler/src/providers/Ethereum.ts
+++ b/services/crawler/src/providers/Ethereum.ts
@@ -36,7 +36,6 @@ export class EthereumService {
const input: Record = {}
parsedLog.eventFragment.inputs.forEach((key, index) => {
- console.log('Key', key.name)
input[key.name] = args[index]
})
return input
@@ -52,19 +51,16 @@ export class EthereumService {
network: this.network,
provider: Provider.Casimir,
type: 'block',
+ height: block.number,
block: block.hash,
created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
address: block.miner,
- height: block.number,
gasUsed: block.gasUsed.toNumber(),
gasLimit: block.gasLimit.toNumber(),
- // @ts-ignore
- baseFee: block.baseFeePerGas.toNumber(),
- // @ts-ignore
- burntFee: parseFloat(ethers.utils.formatEther(ethers.BigNumber.from(block.gasUsed).mul(block.baseFeePerGas))),
+ baseFee: block.baseFeePerGas?.toNumber(),
+ // burntFee: parseFloat(ethers.utils.formatEther(ethers.BigNumber.from(block.gasUsed).mul(block.baseFeePerGas as ethers.BigNumber))),
}
- console.log('Block Event', blockEvent)
events.push(blockEvent)
if (block.transactions.length === 0) {
@@ -83,10 +79,14 @@ export class EthereumService {
address: tx.from,
to_address: tx.to,
height: block.number,
- amount: ethers.utils.formatEther(tx.value.toString())
+ amount: ethers.utils.formatEther(tx.value.toString()),
+ gasUsed: block.gasUsed.toNumber(),
+ gasLimit: block.gasLimit.toNumber(),
+ baseFee: block.baseFeePerGas?.toNumber(),
+ // burntFee: parseFloat(ethers.utils.formatEther(ethers.BigNumber.from(block.gasUsed).mul(block.baseFeePerGas as ethers.BigNumber))),
}
- console.log('Tx Event', txEvent)
+ events.push(txEvent)
const receipts = await this.provider.getTransactionReceipt(tx.hash)
@@ -94,11 +94,9 @@ export class EthereumService {
continue
}
- for await (const log of receipts.logs) {
+ for (const log of receipts.logs) {
if (log.address in ContractsOfInterest) {
const parsedLog = this.parseLog(log)
- // const value = Buffer.from(parsedLog.amount.slice(2), 'hex').readBigUInt64BE(0).toString()
-
const deposit = {
chain: this.chain,
network: this.network,
@@ -110,28 +108,15 @@ export class EthereumService {
address: log.address,
height: block.number,
to_address: tx.to || '',
- // amount: value,
+ amount: parsedLog.amount,
+ gasUsed: block.gasUsed.toNumber(),
+ gasLimit: block.gasLimit.toNumber(),
+ baseFee: block.baseFeePerGas?.toNumber(),
+ // burntFee: parseFloat(ethers.utils.formatEther(ethers.BigNumber.from(block.gasUsed).mul(block.baseFeePerGas as ethers.BigNumber))),
}
-
- console.log('Deposit', deposit)
events.push(deposit)
continue
}
-
- const logEvent = {
- chain: this.chain,
- network: this.network,
- provider: Provider.Casimir,
- type: 'log',
- block: block.hash,
- transaction: log.transactionHash,
- created_at: new Date(block.timestamp * 1000).toISOString().replace('T', ' ').replace('Z', ''),
- address: log.address,
- height: block.number,
- to_address: tx.to || '',
- amount: tx.value.toString(),
- }
- events.push(logEvent)
}
}
return {
diff --git a/services/crawler/test/crawler.test.ts b/services/crawler/test/crawler.test.ts
index 87b13436c..e2decfc17 100644
--- a/services/crawler/test/crawler.test.ts
+++ b/services/crawler/test/crawler.test.ts
@@ -6,9 +6,6 @@ jest.setTimeout(1000000)
test('init crawler for ethereum', async () => {
const eth = await crawler({
chain: Chain.Ethereum,
- options: {
- url: 'https://eth-mainnet.alchemyapi.io/v2/5zDQdGo96cD5RJSDuUcS9HktqFOBJH05'
- },
verbose: true
})
await eth.start()
From 17c0417303f655e44bede51f578c70e7bbb875c7 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Tue, 11 Oct 2022 14:22:36 -0400
Subject: [PATCH 39/40] Clean
---
services/crawler/src/index.ts | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/services/crawler/src/index.ts b/services/crawler/src/index.ts
index 882f8f511..047b73d55 100644
--- a/services/crawler/src/index.ts
+++ b/services/crawler/src/index.ts
@@ -71,15 +71,15 @@ class Crawler {
for (let i = start; i < current.number; i++) {
const { events, blockHash } = await this.service.getEvents(i)
const ndjson = events.map((e: Partial) => JSON.stringify(e)).join('\n')
- // await uploadToS3({
- // bucket: eventOutputBucket,
- // key: `${blockHash}-event.json`,
- // data: ndjson
- // }).finally(() => {
- // if (this.config.verbose) {
- // console.log(`uploaded events for block ${blockHash}`)
- // }
- // })
+ await uploadToS3({
+ bucket: eventOutputBucket,
+ key: `${blockHash}-event.json`,
+ data: ndjson
+ }).finally(() => {
+ if (this.config.verbose) {
+ console.log(`uploaded events for block ${blockHash}`)
+ }
+ })
}
return
}
From 20e5c3c205035b7e221cbeda85d874eab2687049 Mon Sep 17 00:00:00 2001
From: hawyar
Date: Tue, 11 Oct 2022 16:40:05 -0400
Subject: [PATCH 40/40] Fix gas data types
---
common/data/src/index.ts | 2 +-
common/data/src/schemas/event.schema.json | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/data/src/index.ts b/common/data/src/index.ts
index a09454fdc..2be4b32d5 100644
--- a/common/data/src/index.ts
+++ b/common/data/src/index.ts
@@ -14,7 +14,7 @@ export function schemaToGlueColumns(jsonSchema: JsonSchema): glue.Column[] {
return Object.keys(jsonSchema.properties).map((name: string) => {
const property = jsonSchema.properties[name]
- // 'STRING' | 'INTEGER' | 'BOOLEAN' | 'DOUBLE' | 'DECIMAL' | 'BIGINT' | 'TIMESTAMP' | 'JSON' | 'DATE'
+ // 'STRING' | 'INTEGER' | 'BOOLEAN' | 'DOUBLE' | 'DECIMAL' | 'BIG_INT' | 'TIMESTAMP' | 'JSON' | 'DATE'
const typeKey = property.type.toUpperCase() as keyof glue.Schema
let type: glue.Type = glue.Schema[typeKey]
diff --git a/common/data/src/schemas/event.schema.json b/common/data/src/schemas/event.schema.json
index 1261aaec6..081218a18 100644
--- a/common/data/src/schemas/event.schema.json
+++ b/common/data/src/schemas/event.schema.json
@@ -49,15 +49,15 @@
"description": "The amount of currency associated with the event"
},
"gas_used": {
- "type": "bigint",
+ "type": "big_int",
"description": "The total amount of gas used"
},
"gas_limit": {
- "type": "bigint",
+ "type": "big_int",
"description": "The gas limit provided by transactions in the block"
},
"base_fee": {
- "type": "bigint",
+ "type": "big_int",
"description": "Post-London upgrade this represents the minimum gasUsed multiplier required for a transaction to be included in a block"
},
"burnt_fee": {