diff --git a/app.log b/app.log deleted file mode 100644 index e69de29..0000000 diff --git a/package-lock.json b/package-lock.json index 0bab45f..fa2d89a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "pg": "^8.11.5", "type-graphql": "^1.2.0-rc.1", "typeorm": "^0.3.20", - "web3": "^4.9.0", "winston": "^3.13.0" }, "devDependencies": { @@ -370,17 +369,6 @@ "kuler": "^2.0.0" } }, - "node_modules/@ethereumjs/rlp": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", - "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", - "bin": { - "rlp": "bin/rlp" - }, - "engines": { - "node": ">=14" - } - }, "node_modules/@graphql-tools/merge": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.3.tgz", @@ -637,72 +625,6 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, - "node_modules/@scure/base": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.6.tgz", - "integrity": "sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", - "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", - "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32/node_modules/@noble/curves": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", - "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", - "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", - "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", - "dependencies": { - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@sqltools/formatter": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", @@ -1294,28 +1216,6 @@ "integrity": "sha512-e2PNXoXLr6Z+dbfx5zSh9TRlXJrELycxiaXznp4S5+D2M3b9bqJEitNHA5923jhnB2zzFiZHa2f0SI1HoIahpg==", "peer": true }, - "node_modules/@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/abitype": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.7.1.tgz", - "integrity": "sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ==", - "peerDependencies": { - "typescript": ">=4.9.4", - "zod": "^3 >=3.19.1" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2235,50 +2135,12 @@ "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==" }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "devOptional": true }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/cross-fetch/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/cross-inspect": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/cross-inspect/-/cross-inspect-1.0.0.tgz", @@ -2627,39 +2489,6 @@ "node": ">= 0.6" } }, - "node_modules/ethereum-cryptography": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.0.tgz", - "integrity": "sha512-hsm9JhfytIf8QME/3B7j4bc8V+VdTU+Vas1aJlvIS96ffoNAosudXvGoEvWmc7QZYdkC8mrMJz9r0fcbw7GyCA==", - "dependencies": { - "@noble/curves": "1.4.0", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", - "@scure/bip39": "1.3.0" - } - }, - "node_modules/ethereum-cryptography/node_modules/@noble/curves": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", - "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", - "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/ethers": { "version": "6.12.1", "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.12.1.tgz", @@ -2726,11 +2555,6 @@ "es5-ext": "~0.10.14" } }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" - }, "node_modules/express": { "version": "4.19.2", "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", @@ -3426,20 +3250,6 @@ "node": ">=8" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -3544,20 +3354,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4501,11 +4297,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -5068,6 +4859,7 @@ "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5101,18 +4893,6 @@ "node": ">=6.14.2" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -5177,318 +4957,6 @@ "node": ">= 8" } }, - "node_modules/web3": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-4.9.0.tgz", - "integrity": "sha512-O0R90ijjyqUlG1Wk3SXqfYMU1ZGJvLCAF/WfSg/isDz/0Fkpqxoj893wauZ+ieRvTXITlbQHVXGfpp8qrhWZ1g==", - "dependencies": { - "web3-core": "^4.4.0", - "web3-errors": "^1.2.0", - "web3-eth": "^4.7.0", - "web3-eth-abi": "^4.2.2", - "web3-eth-accounts": "^4.1.2", - "web3-eth-contract": "^4.5.0", - "web3-eth-ens": "^4.3.0", - "web3-eth-iban": "^4.0.7", - "web3-eth-personal": "^4.0.8", - "web3-net": "^4.1.0", - "web3-providers-http": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-rpc-methods": "^1.3.0", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-4.4.0.tgz", - "integrity": "sha512-sN1AkhTAFI89anOeCaO0c3GtiGeWtOGVc2tmTdQs2Rd14HuxLyDuLIF3/WwjtkDFRM2189uYy8HJJSWJvW2mYA==", - "dependencies": { - "web3-errors": "^1.2.0", - "web3-eth-accounts": "^4.1.2", - "web3-eth-iban": "^4.0.7", - "web3-providers-http": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - }, - "optionalDependencies": { - "web3-providers-ipc": "^4.0.7" - } - }, - "node_modules/web3-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/web3-errors/-/web3-errors-1.2.0.tgz", - "integrity": "sha512-58Kczou5zyjcm9LuSs5Hrm6VrG8t9p2J8X0yGArZrhKNPZL66gMGkOUpPx+EopE944Sk4yE+Q25hKv4H5BH+kA==", - "dependencies": { - "web3-types": "^1.6.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-4.7.0.tgz", - "integrity": "sha512-gqlWq4Xjz+yKL2MdxQ+BgR3F4CRo4AXWDXzftb3LDzvauEfjk/yRyoxkMSK4S9RIG96ylRImS172cV6cYzcukw==", - "dependencies": { - "setimmediate": "^1.0.5", - "web3-core": "^4.4.0", - "web3-errors": "^1.2.0", - "web3-eth-abi": "^4.2.2", - "web3-eth-accounts": "^4.1.2", - "web3-net": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-rpc-methods": "^1.3.0", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-abi": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-4.2.2.tgz", - "integrity": "sha512-akbGi642UtKG3k3JuLbhl9KuG7LM/cXo/by2WfdwfOptGZrzRsWJNWje1d2xfw1n9kkVG9SAMvPJl1uSyR3dfw==", - "dependencies": { - "abitype": "0.7.1", - "web3-errors": "^1.2.0", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-accounts": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-4.1.2.tgz", - "integrity": "sha512-y0JynDeTDnclyuE9mShXLeEj+BCrPHxPHOyPCgTchUBQsALF9+0OhP7WiS3IqUuu0Hle5bjG2f5ddeiPtNEuLg==", - "dependencies": { - "@ethereumjs/rlp": "^4.0.1", - "crc-32": "^1.2.2", - "ethereum-cryptography": "^2.0.0", - "web3-errors": "^1.1.4", - "web3-types": "^1.6.0", - "web3-utils": "^4.2.3", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-contract": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-4.5.0.tgz", - "integrity": "sha512-AX6OiDrIryz/T28k9Xz0gXpUrlOUjcooEgGluu2s5dFDWCPM/zlN5RsUZlXZiXpQyj52VCUy5+bkvu3yDPA4fg==", - "dependencies": { - "web3-core": "^4.4.0", - "web3-errors": "^1.2.0", - "web3-eth": "^4.7.0", - "web3-eth-abi": "^4.2.2", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-ens": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-4.3.0.tgz", - "integrity": "sha512-QpiKT9GqJouH5kEI/pRFprh88YPCtbht2Ym6rrklZ+VoWl9D+wLfbwvW7Aox349FS7k0UX2qVins5tVNLJ5GCQ==", - "dependencies": { - "@adraffy/ens-normalize": "^1.8.8", - "web3-core": "^4.4.0", - "web3-errors": "^1.2.0", - "web3-eth": "^4.7.0", - "web3-eth-contract": "^4.5.0", - "web3-net": "^4.1.0", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-iban": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-4.0.7.tgz", - "integrity": "sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ==", - "dependencies": { - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-personal": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-4.0.8.tgz", - "integrity": "sha512-sXeyLKJ7ddQdMxz1BZkAwImjqh7OmKxhXoBNF3isDmD4QDpMIwv/t237S3q4Z0sZQamPa/pHebJRWVuvP8jZdw==", - "dependencies": { - "web3-core": "^4.3.0", - "web3-eth": "^4.3.1", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-net": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-4.1.0.tgz", - "integrity": "sha512-WWmfvHVIXWEoBDWdgKNYKN8rAy6SgluZ0abyRyXOL3ESr7ym7pKWbfP4fjApIHlYTh8tNqkrdPfM4Dyi6CA0SA==", - "dependencies": { - "web3-core": "^4.4.0", - "web3-rpc-methods": "^1.3.0", - "web3-types": "^1.6.0", - "web3-utils": "^4.3.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-4.1.0.tgz", - "integrity": "sha512-6qRUGAhJfVQM41E5t+re5IHYmb5hSaLc02BE2MaRQsz2xKA6RjmHpOA5h/+ojJxEpI9NI2CrfDKOAgtJfoUJQg==", - "dependencies": { - "cross-fetch": "^4.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ipc": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-4.0.7.tgz", - "integrity": "sha512-YbNqY4zUvIaK2MHr1lQFE53/8t/ejHtJchrWn9zVbFMGXlTsOAbNoIoZWROrg1v+hCBvT2c9z8xt7e/+uz5p1g==", - "optional": true, - "dependencies": { - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ws": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-4.0.7.tgz", - "integrity": "sha512-n4Dal9/rQWjS7d6LjyEPM2R458V8blRm0eLJupDEJOOIBhGYlxw5/4FthZZ/cqB7y/sLVi7K09DdYx2MeRtU5w==", - "dependencies": { - "@types/ws": "8.5.3", - "isomorphic-ws": "^5.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "ws": "^8.8.1" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ws/node_modules/isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/web3-rpc-methods": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-rpc-methods/-/web3-rpc-methods-1.3.0.tgz", - "integrity": "sha512-/CHmzGN+IYgdBOme7PdqzF+FNeMleefzqs0LVOduncSaqsppeOEoskLXb2anSpzmQAP3xZJPaTrkQPWSJMORig==", - "dependencies": { - "web3-core": "^4.4.0", - "web3-types": "^1.6.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-types": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/web3-types/-/web3-types-1.6.0.tgz", - "integrity": "sha512-qgOtADqlD5hw+KPKBUGaXAcdNLL0oh6qTeVgXwewCfbL/lG9R+/GrgMQB1gbTJ3cit8hMwtH8KX2Em6OwO0HRw==", - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-utils": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.3.0.tgz", - "integrity": "sha512-fGG2IZr0XB1vEoWZiyJzoy28HpsIfZgz4mgPeQA9aj5rIx8z0o80qUPtIyrCYX/Bo2gYALlV5SWIJWxJNUQn9Q==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.2.0", - "web3-types": "^1.6.0", - "web3-validator": "^2.0.6" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/web3-validator/-/web3-validator-2.0.6.tgz", - "integrity": "sha512-qn9id0/l1bWmvH4XfnG/JtGKKwut2Vokl6YXP5Kfg424npysmtRLe9DgiNBM9Op7QL/aSiaA0TVXibuIuWcizg==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "util": "^0.12.5", - "web3-errors": "^1.2.0", - "web3-types": "^1.6.0", - "zod": "^3.21.4" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -5859,14 +5327,6 @@ "engines": { "node": ">=6" } - }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } } } } diff --git a/package.json b/package.json index 029dec7..3452e62 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "pg": "^8.11.5", "type-graphql": "^1.2.0-rc.1", "typeorm": "^0.3.20", - "web3": "^4.9.0", "winston": "^3.13.0" }, "devDependencies": { diff --git a/src/handlers/channels.ts b/src/handlers/channels.ts index 0f1570b..c1de38a 100644 --- a/src/handlers/channels.ts +++ b/src/handlers/channels.ts @@ -452,7 +452,6 @@ export async function channelMetrics(channelIds: string[], ctx: Context): Promis await updateInitToAckMetrics(channel, ctx); ackChannels.set(channel.channelOpenAck.id, channel.channelOpenAck); } catch (e) { - console.log(e) ctx.log.error(`Error updating init to ack metrics for channel ${channel.id}: ${e}`) channel.catchupError!.initToAckPolymerGas += 1 catchupErrors.add(channel.catchupError!); diff --git a/src/handlers/helpers.ts b/src/handlers/helpers.ts index daa6d51..e1dd3d9 100644 --- a/src/handlers/helpers.ts +++ b/src/handlers/helpers.ts @@ -1,5 +1,4 @@ -import { Web3 } from 'web3'; -import { isAddress } from 'web3-validator'; +import { ethers } from 'ethers'; import { logger } from '../utils/logger'; export function getDispatcherType(portPrefix: string) { @@ -18,7 +17,7 @@ export function getDispatcherClientName(portPrefix: string) { } export function packetToSender(packetData: Uint8Array): string { - const hexString = Web3.utils.bytesToHex(packetData); + const hexString = ethers.hexlify(packetData); if (hexString.length < 66) { logger.error(`Invalid packet data: ${hexString}`); @@ -28,7 +27,7 @@ export function packetToSender(packetData: Uint8Array): string { const paddedAddress = hexString.slice(0, 66); const address = '0x' + paddedAddress.slice(-40); - if (!isAddress(address)) { + if (!ethers.isAddress(address)) { logger.error(`Invalid packet sender: ${address}`); return ''; }