diff --git a/.env b/.env index d88d71c..3ffa9f2 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -PRIVATE_KEY=_private_key_ -POLYGON_CHAINID = "137" -ARBITRUM_CHAINID = "42161" -OPTIMISM_CHAINID = "10" \ No newline at end of file +ARBITRUM_CHAINID="42161" +OPTIMISM_CHAINID="10" +POLYGON_CHAINID="137" +PRIVATE_KEY=_private_key_ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 21b845f..9346c74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules -etherspot-prime-sdk \ No newline at end of file +etherspot-prime-sdk +.eslintrc.json +.prettierrc \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f1a82f7..89b54af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,528 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@babel/eslint-parser": "^7.22.9", + "@babel/plugin-syntax-import-assertions": "^7.22.5", "@etherspot/contracts": "^2.0.1", - "@etherspot/prime-sdk": "^1.0.1", + "@etherspot/prime-sdk": "1.1.0", "@reactivex/rxjs": "^6.6.7", "axios": "^1.4.0", "chai": "^4.3.7", "dotenv": "^16.0.3", "erc-20-abi": "^1.0.0", + "eslint-config-node": "^4.1.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^5.0.0", "ethers": "5.7.0", "mocha": "^10.2.0", + "prettier": "^3.0.0", "rxjs": "^7.8.1", "ws": "^8.13.0" + }, + "devDependencies": { + "eslint": "^8.45.0" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "dependencies": { + "@babel/highlight": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", + "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz", + "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==", + "peer": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.9", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/eslint-parser": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.22.9.tgz", + "integrity": "sha512-xdMkt39/nviO/4vpVdrEYPwXCsYIXSSAr6mC7WQsNIlGnuxKyKE7GZjalcnbSWiC4OXGNNN3UQPeHfjSC6sTDA==", + "dependencies": { + "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.11.0", + "eslint": "^7.5.0 || ^8.0.0" + } + }, + "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@babel/generator": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", + "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "dependencies": { + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz", + "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "peer": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", + "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "peer": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "peer": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", + "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", + "peer": true, + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", + "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.22.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", + "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/types": "^7.22.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@etherspot/contracts": { @@ -28,9 +539,9 @@ "integrity": "sha512-m1tlrr7Ou//GFC8G3+Lg7VfjbsnhRY3CPVRSmtksQFRbLJnJtyURSrJdUN4tj+18vgn+Dyxi/yXfKPUsgQU5DQ==" }, "node_modules/@etherspot/prime-sdk": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@etherspot/prime-sdk/-/prime-sdk-1.0.1.tgz", - "integrity": "sha512-LVKhpJRFMHxf+FcCUi+jBjPCzySgr+PAGOQOz0ZB/CQr3eamQcOWElyMbbPltRjcUlnvLMo9oDz31hS0YIEsFA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@etherspot/prime-sdk/-/prime-sdk-1.1.0.tgz", + "integrity": "sha512-Bauw0j0lGtGnoJ3aCFYL9Uvuvh+2mHWToxzirV8P13yN7Cf7uCywSsIiwU/flFNs13/N3Ssv0R6zcq4wqXm8PA==", "dependencies": { "@thehubbleproject/bls": "0.5.1", "axios": "1.3.4", @@ -52,6 +563,20 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/@etherspot/prime-sdk/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/@ethersproject/abi": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", @@ -743,46 +1268,262 @@ "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@reactivex/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/@reactivex/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-xZIV2JgHhWoVPm3uVcFbZDRVJfx2hgqmuTX7J4MuKaZ+j5jN29agniCPBwrlCmpA15/zLKcPi7/bogt0ZwOFyA==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dependencies": { - "tslib": "^1.9.0" + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" }, "engines": { - "npm": ">=2.0.0" + "node": ">=10.10.0" } }, - "node_modules/@reactivex/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@thehubbleproject/bls": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@thehubbleproject/bls/-/bls-0.5.1.tgz", - "integrity": "sha512-g5zeMZ8js/yg6MjFoC+pt0eqfCL2jC46yLY1LbKNriyqftB1tE3jpG/FMMDIW3x9/yRg/AgUb8Nluqj15tQs+A==", + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dependencies": { - "ethers": "^5.5.3", - "mcl-wasm": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@types/node": { - "version": "20.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.0.tgz", - "integrity": "sha512-jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0g==" - }, - "node_modules/@types/validator": { - "version": "13.7.17", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz", - "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ==" + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { + "version": "5.1.1-v1", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", + "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", + "dependencies": { + "eslint-scope": "5.1.1" + } + }, + "node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@reactivex/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/@reactivex/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-xZIV2JgHhWoVPm3uVcFbZDRVJfx2hgqmuTX7J4MuKaZ+j5jN29agniCPBwrlCmpA15/zLKcPi7/bogt0ZwOFyA==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@reactivex/rxjs/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@thehubbleproject/bls": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@thehubbleproject/bls/-/bls-0.5.1.tgz", + "integrity": "sha512-g5zeMZ8js/yg6MjFoC+pt0eqfCL2jC46yLY1LbKNriyqftB1tE3jpG/FMMDIW3x9/yRg/AgUb8Nluqj15tQs+A==", + "dependencies": { + "ethers": "^5.5.3", + "mcl-wasm": "^1.0.0" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" + }, + "node_modules/@types/node": { + "version": "20.4.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", + "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==" + }, + "node_modules/@types/validator": { + "version": "13.7.17", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz", + "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ==" + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } }, "node_modules/aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -791,6 +1532,31 @@ "node": ">=6" } }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -830,6 +1596,89 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -838,11 +1687,30 @@ "node": "*" } }, + "node_modules/astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "engines": { + "node": ">=4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", @@ -853,6 +1721,34 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/babel-eslint": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", + "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + }, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "eslint": ">= 4.12.1" + } + }, + "node_modules/babel-eslint/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -863,6 +1759,14 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -876,6 +1780,17 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -905,6 +1820,72 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, + "node_modules/browserslist": { + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "peer": true, + "dependencies": { + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -916,6 +1897,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/caniuse-lite": { + "version": "1.0.30001517", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz", + "integrity": "sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "peer": true + }, "node_modules/chai": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", @@ -959,6 +1960,11 @@ "node": ">=8" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -1008,14 +2014,33 @@ "validator": "^13.7.0" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "node_modules/color-convert": { @@ -1058,6 +2083,25 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1101,6 +2145,69 @@ "node": ">=6" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1117,6 +2224,17 @@ "node": ">=0.3.1" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dotenv": { "version": "16.0.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", @@ -1125,6 +2243,12 @@ "node": ">=12" } }, + "node_modules/electron-to-chromium": { + "version": "1.4.473", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.473.tgz", + "integrity": "sha512-aVfC8+440vGfl06l8HKKn8/PD5jRfSnLkTTD65EFvU46igbpQRri1gxSzW9/+TeUlwYzrXk1sw867T96zlyECA==", + "peer": true + }, "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -1154,6 +2278,95 @@ "resolved": "https://registry.npmjs.org/erc-20-abi/-/erc-20-abi-1.0.0.tgz", "integrity": "sha512-X+kdxwbfegJ5quNHVyJPf72Y8g+rpurR3vA+K2b4jVUuAl3qHMYxnR7ZOJRC/T7kQu3V8XU4/U4mIJ+w5wUaeQ==" }, + "node_modules/es-abstract": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1173,175 +2386,1696 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ethers": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.0.tgz", - "integrity": "sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/eslint": { + "version": "8.45.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", + "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.0", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.0", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.0", - "@ethersproject/wordlists": "5.7.0" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.6.0", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/eslint-config-esnext": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-esnext/-/eslint-config-esnext-4.1.0.tgz", + "integrity": "sha512-GhfVEXdqYKEIIj7j+Fw2SQdL9qyZMekgXfq6PyXM66cQw0B435ddjz3P3kxOBVihMRJ0xGYjosaveQz5Y6z0uA==", "dependencies": { - "to-regex-range": "^5.0.1" + "babel-eslint": "^10.0.1", + "eslint": "^6.8.0", + "eslint-plugin-babel": "^5.2.1", + "eslint-plugin-import": "^2.14.0" + }, + "peerDependencies": { + "eslint": "^6.0.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=8" + "node": ">=0.4.0" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/eslint-config-esnext/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==", + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-config-esnext/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "bin": { - "flat": "cli.js" + "node_modules/eslint-config-esnext/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" } }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "node_modules/eslint-config-esnext/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "node_modules/eslint-config-esnext/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">= 6" + "node": ">=4" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "node_modules/eslint-config-esnext/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], + "node_modules/eslint-config-esnext/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/eslint-config-esnext/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=4.8" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" + "node_modules/eslint-config-esnext/node_modules/cross-spawn/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "node_modules/eslint-config-esnext/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { - "node": "*" + "node": ">=0.8.0" } }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/eslint-config-esnext/node_modules/eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" }, "engines": { - "node": "*" + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://opencollective.com/eslint" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "node_modules/eslint-config-esnext/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-config-esnext/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-esnext/node_modules/espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dependencies": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dependencies": { + "flat-cache": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-esnext/node_modules/flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dependencies": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-esnext/node_modules/flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "node_modules/eslint-config-esnext/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-config-esnext/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-esnext/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint-config-esnext/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint-config-esnext/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-config-esnext/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-esnext/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "engines": { + "node": ">=6.5.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/eslint-config-esnext/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-config-esnext/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==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-config-esnext/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-esnext/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-esnext/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-config-esnext/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/eslint-config-node": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-node/-/eslint-config-node-4.1.0.tgz", + "integrity": "sha512-Wz17xV5O2WFG8fGdMYEBdbiL6TL7YNJSJvSX9V4sXQownewfYmoqlly7wxqLkOUv/57pq6LnnotMiQQrrPjCqQ==", + "dependencies": { + "eslint": "^6.8.0", + "eslint-config-esnext": "^4.1.0" + }, + "peerDependencies": { + "eslint": "^6.0.0" + } + }, + "node_modules/eslint-config-node/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/eslint-config-node/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==", + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-config-node/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/eslint-config-node/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-config-node/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/eslint-config-node/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/eslint-config-node/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/eslint-config-node/node_modules/cross-spawn/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/eslint-config-node/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-config-node/node_modules/eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-node/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-config-node/node_modules/eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-config-node/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dependencies": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eslint-config-node/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-config-node/node_modules/file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dependencies": { + "flat-cache": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dependencies": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "node_modules/eslint-config-node/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-config-node/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint-config-node/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint-config-node/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-node/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-config-node/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-node/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-node/node_modules/regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "engines": { + "node": ">=6.5.0" + } + }, + "node_modules/eslint-config-node/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/eslint-config-node/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-config-node/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-config-node/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==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-config-node/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-config-node/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint-config-node/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-config-node/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-babel/-/eslint-plugin-babel-5.3.1.tgz", + "integrity": "sha512-VsQEr6NH3dj664+EyxJwO4FCYm/00JhYb3Sk3ft8o+fpKuIfQ9TaW6uVUfvwMXHcf/lsnRIoyFPsLMyiWCSL/g==", + "dependencies": { + "eslint-rule-composer": "^0.3.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": ">=4.0.0" + } + }, + "node_modules/eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "dependencies": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" + } + }, + "node_modules/eslint-plugin-node/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-node/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", + "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethers": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.0.tgz", + "integrity": "sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.0", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.0", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.0", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/execa": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" @@ -1370,6 +4104,69 @@ "node": "*" } }, + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1378,56 +4175,294 @@ "node": ">=8" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/inquirer/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/inquirer/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "bin": { - "he": "bin/he" + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "bin": { + "is-docker": "cli.js" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-extglob": { @@ -1457,6 +4492,34 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1465,6 +4528,28 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1473,6 +4558,85 @@ "node": ">=8" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -1484,11 +4648,62 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1500,10 +4715,54 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/libphonenumber-js": { - "version": "1.10.37", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.37.tgz", - "integrity": "sha512-Z10PCaOCiAxbUxLyR31DNeeNugSVP6iv/m7UrSKS5JHziEMApJtgku4e9Q69pzzSC9LnQiM09sqsGf2ticZnMw==" + "version": "1.10.38", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.38.tgz", + "integrity": "sha512-4NjVXVUmpZ9Zsqq6FXa2+MKI+KAI3tOqA0pxXgXGluhpj4ge5didmbWJpMBqGB3AVGv1SnEtKdGTbxjSEG1kCQ==" }, "node_modules/locate-path": { "version": "6.0.0", @@ -1519,6 +4778,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -1542,15 +4811,49 @@ "get-func-name": "^2.0.0" } }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "peer": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, "node_modules/mcl-wasm": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-1.1.0.tgz", - "integrity": "sha512-zwuaKTQAkTIc/dA9QmGABNYtMn1wMKRAZU8UAeuZ+1uSD+vUP6TQ0sR82z8Iduc5hkO1f30zyhoVbrufKGp+vQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-1.2.0.tgz", + "integrity": "sha512-AKPPLVze2wjy6nSj2l0IopRIjTT2TWrfyT+KhLsQpeemnx6dqaJBCnGmXYoLq8XuMWbKvx+Aaw8Mp1R2tc9vSw==", "dependencies": { "@types/node": "^20.2.5" }, "engines": { - "node": ">=8.9.0" + "node": ">=14.17" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" } }, "node_modules/mime-db": { @@ -1572,6 +4875,17 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -1593,6 +4907,25 @@ "node": ">=10" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/mocha": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", @@ -1628,32 +4961,127 @@ "node": ">= 14.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "peer": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "bin": { - "nanoid": "bin/nanoid.cjs" + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/once": { @@ -1664,6 +5092,61 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1692,6 +5175,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1708,6 +5202,19 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -1716,6 +5223,11 @@ "node": "*" } }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -1727,25 +5239,79 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -1770,6 +5336,33 @@ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1778,6 +5371,213 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rxjs": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", @@ -1786,6 +5586,23 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1805,11 +5622,37 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -1818,6 +5661,93 @@ "randombytes": "^2.1.0" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dependencies": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/slice-ansi/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==", + "engines": { + "node": ">=4" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -1831,6 +5761,48 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1842,6 +5814,25 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -1867,6 +5858,131 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dependencies": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/table/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==", + "engines": { + "node": ">=6" + } + }, + "node_modules/table/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==" + }, + "node_modules/table/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==", + "engines": { + "node": ">=4" + } + }, + "node_modules/table/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==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/table/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==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -1878,11 +5994,33 @@ "node": ">=8.0" } }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "node_modules/tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -1891,6 +6029,143 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "peer": true, + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, "node_modules/validator": { "version": "13.9.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz", @@ -1899,6 +6174,61 @@ "node": ">= 0.10" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -1925,6 +6255,17 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "node_modules/write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dependencies": { + "mkdirp": "^0.5.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", @@ -1953,6 +6294,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "peer": true + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index 5667ac0..c248a7f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "author": "", "license": "ISC", "dependencies": { + "@babel/eslint-parser": "^7.22.9", + "@babel/plugin-syntax-import-assertions": "^7.22.5", "@etherspot/contracts": "^2.0.1", "@etherspot/prime-sdk": "file:../etherspot-prime-sdk/dist/index.js", "@reactivex/rxjs": "^6.6.7", @@ -21,9 +23,17 @@ "chai": "^4.3.7", "dotenv": "^16.0.3", "erc-20-abi": "^1.0.0", + "eslint-config-node": "^4.1.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^5.0.0", "ethers": "5.7.0", "mocha": "^10.2.0", + "prettier": "^3.0.0", "rxjs": "^7.8.1", "ws": "^8.13.0" + }, + "devDependencies": { + "eslint": "^8.45.0" } } diff --git a/test/data/testData.json b/test/data/testData.json new file mode 100644 index 0000000..93a680d --- /dev/null +++ b/test/data/testData.json @@ -0,0 +1,38 @@ +{ + "eoaAddress": "0xa5494Ed2eB09F37b4b0526a8e4789565c226C84f", + "sender": "0xE75185Fb3d22dD7128836B6B42D938ee8919A512", + "incorrectSender": "0xF75115Fb3d22dD7128833B6B42D938eeE919A514", + "invalidSender": "0xE75185Fb3d22dD7128836B6B42D938ee8919A51", + "recipient": "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B5", + "incorrectRecipient": "0x71Bec2309AC6BCD5F1D7347468AA6154c2DDb4BB", + "invalidRecipient": "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B", + "nft_tokenAddress": "0xe55C5793a52AF819fBf3e87a23B36708E6FDd2Cc", + "tokenId": "2357194", + "incorrectTokenId": "abc", + "value": "0.00001", + "invalidValue": "abcd", + "smallValue": "0.0000000000000000001", + "exceededValue": "1000000000", + "oddInvalidTxHash": "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d444", + "evenInvalidTxHash": "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d44", + "incorrectTxHash": "0x1a44fe659f1502ff49315722be9c69bd76653baf422bfa30669a3485a52d4446", + "pastTxHash": "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d4445", + "tokenAddress_arbitrumUSDC": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + "incorrectTokenAddress_arbitrumUSDC": "0xFF97aA61A04bccA14834A4335dE4533eBDbB5CC0", + "invalidTokenAddress_arbitrumUSDC": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC", + "providerNetwork_arbitrum": "https://arbitrum-bundler.etherspot.io", + "invalidProviderNetwork_arbitrum": "http://arbitrum-bundler.etherspot.io", + "otherProviderNetwork_arbitrum": "https://polygon-bundler.etherspot.io", + "tokenAddress_maticUSDC": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "incorrectTokenAddress_maticUSDC": "0x2791Bca1ffde4661ED8AA30C99A7a9449Aa84174", + "invalidTokenAddress_maticUSDC": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa8417", + "providerNetwork_matic": "https://polygon-bundler.etherspot.io", + "invalidProviderNetwork_matic": "http://polygon-bundler.etherspot.io", + "otherProviderNetwork_matic": "https://matic-bundler.etherspot.io", + "tokenAddress_optimismUSDC": "0x7F5c764cBc14f9669B88837ca1490cCa17c31607", + "incorrectTokenAddress_optimismUSDC": "0x7FFc764cBcc4f9669b888A7c11490cCa17c31600", + "invalidTokenAddress_optimismUSDC": "0x7F5c764cBc14f9669B88837ca1490cCa17c3160", + "providerNetwork_optimism": "https://optimism-bundler.etherspot.io", + "invalidProviderNetwork_optimism": "http://optimism-bundler.etherspot.io", + "otherProviderNetwork_optimism": "https://polygon-bundler.etherspot.io" +} diff --git a/test/specs/mainnet/01_TransferringFunds/Arbitrum.spec.js b/test/specs/mainnet/01_TransferringFunds/Arbitrum.spec.js index c64a72b..4eae481 100644 --- a/test/specs/mainnet/01_TransferringFunds/Arbitrum.spec.js +++ b/test/specs/mainnet/01_TransferringFunds/Arbitrum.spec.js @@ -1,51 +1,35 @@ -import { PrimeSdk } from "@etherspot/prime-sdk"; -import { ethers } from "ethers"; -import { assert } from "chai"; -import { ERC20_ABI } from "@etherspot/prime-sdk/dist/sdk/helpers/abi/ERC20_ABI.js"; -import * as dotenv from "dotenv"; +import { PrimeSdk } from '@etherspot/prime-sdk'; +import { ethers } from 'ethers'; +import { assert } from 'chai'; +import { ERC20_ABI } from '@etherspot/prime-sdk/dist/sdk/helpers/abi/ERC20_ABI.js'; +import data from '../../../data/testData.json' assert { type: 'json' }; +import abi from '../../../data/NFTabi.json' assert { type: 'json' }; +import * as dotenv from 'dotenv'; dotenv.config(); // init dotenv let arbitrumMainNetSdk; let arbitrumEtherspotWalletAddress; -let sender = "0x97EC9803387fcBc4A238BCeA2C6C1b75438D39C3"; -let recipient = "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B5"; -let incorrectRecipient = "0x71Bec2309AC6BCD5F1D7347468AA6154c2DDb4BB"; -let invalidRecipient = "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B"; -let tokenAddress = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"; -let incorrectTokenAddress = "0xFF97aA61A04bccA14834A4335dE4533eBDbB5CC0"; -let invalidTokenAddress = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC"; -let value = "0.00001"; -let invalidValue = "abcd"; -let smallValue = "0.0000000000000000001"; -let exceededValue = "1000000000"; -let providerNetwork = "https://polygon-bundler.etherspot.io"; -let invalidProviderNetwork = "http://polygon-bundler.etherspot.io"; -let otherProviderNetwork = "https://arbitrum-bundler.etherspot.io"; -let oddInvalidTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d444"; -let evenInvalidTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d44"; -let incorrectTxHash = - "0x1a44fe659f1502ff49315722be9c69bd76653baf422bfa30669a3485a52d4446"; -let pastTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d4445"; - -describe("The SDK, when transfer a token with arbitrum network on the MainNet", () => { + +describe('The SDK, when transfer a token with arbitrum network on the MainNet', () => { beforeEach(async () => { // initializating sdk try { arbitrumMainNetSdk = new PrimeSdk(process.env.PRIVATE_KEY, { - chainId: Number(process.env.POLYGON_CHAINID), + chainId: Number(process.env.ARBITRUM_CHAINID), }); - assert.strictEqual( - arbitrumMainNetSdk.state.walletAddress, - "0xa5494Ed2eB09F37b4b0526a8e4789565c226C84f", - "The EOA Address is not calculated correctly." - ); + try { + assert.strictEqual( + arbitrumMainNetSdk.state.walletAddress, + data.eoaAddress, + 'The EOA Address is not calculated correctly.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); - assert.fail("The SDK is not initialled successfully."); + assert.fail('The SDK is not initialled successfully.'); } // get EtherspotWallet address @@ -53,40 +37,44 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", arbitrumEtherspotWalletAddress = await arbitrumMainNetSdk.getCounterFactualAddress(); - assert.strictEqual( - arbitrumEtherspotWalletAddress, - sender, - "The Etherspot Wallet Address is not calculated correctly." - ); + try { + assert.strictEqual( + arbitrumEtherspotWalletAddress, + data.sender, + 'The Etherspot Wallet Address is not calculated correctly.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); assert.fail( - "The Etherspot Wallet Address is not displayed successfully." + 'The Etherspot Wallet Address is not displayed successfully.', ); } }); - it("SMOKE: Perform the transfer native token with valid details on the arbitrum network", async () => { + it('SMOKE: Perform the transfer native token with valid details on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch let transactionBatch; try { transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); try { assert.isNotEmpty( transactionBatch.to, - "The To Address value is empty in the transaction batch response." + 'The To Address value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); @@ -95,7 +83,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( transactionBatch.data, - "The data value is empty in the transaction batch response." + 'The data value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); @@ -104,14 +92,14 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( transactionBatch.value, - "The value's value is empty in the transaction batch response." + 'The value value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address @@ -122,14 +110,14 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( balance, - "The balance is not number in the get native balance response." + 'The balance is not number in the get native balance response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch @@ -140,8 +128,8 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.strictEqual( op.sender, - sender, - "The send value is not correct in the sign transactions added to the batch response." + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -150,7 +138,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.nonce._hex, - "The hex value of the nonce is empty in the sign transactions added to the batch response." + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -159,7 +147,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.nonce._isBigNumber, - "The isBigNumber value of the nonce is false in the sign transactions added to the batch response." + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -168,7 +156,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.initCode, - "The initCode value is empty in the sign transactions added to the batch response." + 'The initCode value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -177,7 +165,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.callData, - "The callData value is empty in the sign transactions added to the batch response." + 'The callData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -186,7 +174,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.callGasLimit._hex, - "The hex value of the callGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -195,7 +183,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.callGasLimit._isBigNumber, - "The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -204,7 +192,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.verificationGasLimit._hex, - "The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -213,7 +201,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.verificationGasLimit._isBigNumber, - "The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -222,7 +210,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.maxFeePerGas._hex, - "The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -231,7 +219,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.maxFeePerGas._isBigNumber, - "The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -240,7 +228,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.maxPriorityFeePerGas._hex, - "The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -249,7 +237,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.maxPriorityFeePerGas._isBigNumber, - "The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -258,7 +246,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNumber( op.chainId, - "The chainId value is not number in the sign transactions added to the batch response." + 'The chainId value is not number in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -267,7 +255,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.paymasterAndData, - "The paymasterAndData value is empty in the sign transactions added to the batch response." + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -276,7 +264,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.preVerificationGas._hex, - "The hex value of the preVerificationGas is empty in the sign transactions added to the batch response." + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -285,7 +273,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.preVerificationGas._isBigNumber, - "The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -294,14 +282,14 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.signature, - "The signature value is empty in the sign transactions added to the batch response." + 'The signature value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // sending to the bundler @@ -311,53 +299,60 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", assert.isNotEmpty( uoHash, - "The uoHash value is empty in the sending bundler response." + 'The uoHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The sending to the bundler action is not performed."); + assert.fail('The sending to the bundler action is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); + console.log('Waiting for transaction..'); let txHash = await arbitrumMainNetSdk.getUserOpReceipt(uoHash); assert.isNotEmpty( txHash, - "The txHash value is empty in the sending bundler response." + 'The txHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The get transaction hash action is not performed.'); } }); - it("SMOKE: Perform the transfer ERC20 token with valid details on the arbitrum network", async () => { + it('SMOKE: Perform the transfer ERC20 token with valid details on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); try { assert.isTrue( provider._isProvider, - "The isProvider value is false in the provider response." + 'The isProvider value is false in the provider response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -368,7 +363,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( decimals, - "The decimals value is empty in the get decimals from erc20 contract response." + 'The decimals value is empty in the get decimals from erc20 contract response.', ); } catch (e) { console.error(e); @@ -376,22 +371,22 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); try { assert.isNotEmpty( transactionData, - "The decimals value is empty in the get decimals from erc20 contract response." + 'The decimals value is empty in the get decimals from erc20 contract response.', ); } catch (e) { console.error(e); @@ -399,7 +394,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -408,21 +403,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch let userOpsBatch; try { userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + to: data.tokenAddress_arbitrumUSDC, data: transactionData, }); try { assert.isNotEmpty( userOpsBatch.to, - "The To Address value is empty in the transaction batch response." + 'The To Address value is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -431,7 +426,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( userOpsBatch.data, - "The data value is empty in the transaction batch response." + 'The data value is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -439,8 +434,8 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( - userOpsBatch.value._hex, - "The hex value of the userOpsBatch is empty in the sign transactions added to the batch response." + userOpsBatch.value[0]._hex, + 'The hex value of the userOpsBatch is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -448,15 +443,15 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( - userOpsBatch.value._isBigNumber, - "The isBigNumber value of the userOpsBatch is false in the sign transactions added to the batch response." + userOpsBatch.value[0]._isBigNumber, + 'The isBigNumber value of the userOpsBatch is false in the userops batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch @@ -467,8 +462,8 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.strictEqual( op.sender, - sender, - "The send value is not correct in the sign transactions added to the batch response." + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -477,7 +472,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.nonce._hex, - "The hex value of the nonce is empty in the sign transactions added to the batch response." + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -486,7 +481,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.nonce._isBigNumber, - "The isBigNumber value of the nonce is false in the sign transactions added to the batch response." + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -495,7 +490,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.initCode, - "The initCode value is empty in the sign transactions added to the batch response." + 'The initCode value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -504,7 +499,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.callData, - "The callData value is empty in the sign transactions added to the batch response." + 'The callData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -513,7 +508,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.callGasLimit._hex, - "The hex value of the callGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -522,7 +517,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.callGasLimit._isBigNumber, - "The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -531,7 +526,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.verificationGasLimit._hex, - "The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -540,7 +535,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.verificationGasLimit._isBigNumber, - "The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -549,7 +544,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.maxFeePerGas._hex, - "The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -558,7 +553,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.maxFeePerGas._isBigNumber, - "The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -567,7 +562,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.maxPriorityFeePerGas._hex, - "The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -576,7 +571,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.maxPriorityFeePerGas._isBigNumber, - "The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -585,7 +580,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNumber( op.chainId, - "The chainId value is not number in the sign transactions added to the batch response." + 'The chainId value is not number in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -594,7 +589,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.paymasterAndData, - "The paymasterAndData value is empty in the sign transactions added to the batch response." + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -603,7 +598,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.preVerificationGas._hex, - "The hex value of the preVerificationGas is empty in the sign transactions added to the batch response." + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -612,7 +607,7 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isTrue( op.preVerificationGas._isBigNumber, - "The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -621,14 +616,14 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { assert.isNotEmpty( op.signature, - "The signature value is empty in the sign transactions added to the batch response." + 'The signature value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // sending to the bundler @@ -638,55 +633,108 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", assert.isNotEmpty( uoHash, - "The uoHash value is empty in the sending bundler response." + 'The uoHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The sending to the bundler action is not performed."); + assert.fail('The sending to the bundler action is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); + console.log('Waiting for transaction...'); let txHash = await arbitrumMainNetSdk.getUserOpReceipt(uoHash); assert.isNotEmpty( txHash, - "The txHash value is empty in the sending bundler response." + 'The txHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The get transaction hash action is not performed.'); } }); - it("Regression: Perform the transfer native token with the incorrect To Address while sign the added transactions to the batch on the arbitrum network", async () => { - // clear the transaction batch + it('SMOKE: Perform the transfer ERC721 NFT token with valid details on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; try { - await arbitrumMainNetSdk.clearUserOpsFromBatch(); + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + + try { + assert.isNotEmpty( + erc721Data, + 'The erc721 Contract Interface value is empty in the erc721 Contract Interface response.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); } - // add transactions to the batch - let transactionBatch; + // clear the transaction batch try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: incorrectRecipient, // incorrect to address - value: ethers.utils.parseEther(value), - }); + await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The transaction of the batch is not clear correctly.'); } - // get balance of the account address - let balance; + // add transactions to the batch + let userOpsBatch; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + + try { + assert.isNotEmpty( + userOpsBatch.to[0], + 'The To Address value is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + userOpsBatch.data[0], + 'The data value is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + userOpsBatch.value[0]._hex, + 'The hex value of the userOpsBatch is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + userOpsBatch.value[0]._isBigNumber, + 'The isBigNumber value of the userOpsBatch is false in the userops batch response.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch @@ -694,25 +742,194 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", try { op = await arbitrumMainNetSdk.sign(); - assert.fail( - "The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch." - ); - } catch (e) { - let error = e.reason; - if (error.includes("bad address checksum")) { - console.log( - "The validation for To Address is displayed as expected while sign the added transactions to the batch." + try { + assert.strictEqual( + op.sender, + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); - } else { + } catch (e) { console.error(e); - assert.fail( - "The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch." + } + + try { + assert.isNotEmpty( + op.nonce._hex, + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.nonce._isBigNumber, + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.initCode, + 'The initCode value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.callData, + 'The callData value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.callGasLimit._hex, + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.callGasLimit._isBigNumber, + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.verificationGasLimit._hex, + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.verificationGasLimit._isBigNumber, + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.maxFeePerGas._hex, + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.maxFeePerGas._isBigNumber, + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.maxPriorityFeePerGas._hex, + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.maxPriorityFeePerGas._isBigNumber, + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.paymasterAndData, + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.preVerificationGas._hex, + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.preVerificationGas._isBigNumber, + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.signature, + 'The signature value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); } + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // sending to the bundler + let uoHash; + try { + uoHash = await arbitrumMainNetSdk.send(op); + + assert.isNotEmpty( + uoHash, + 'The uoHash value is empty in the sending bundler response.', + ); + } catch (e) { + console.error(e); + assert.fail('The sending to the bundler action is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + let txHash = await arbitrumMainNetSdk.getUserOpReceipt(uoHash); + + assert.isNotEmpty( + txHash, + 'The txHash value is empty in the sending bundler response.', + ); + } catch (e) { + console.error(e); + assert.fail('The get transaction hash action is not performed.'); } }); - it("Regression: Perform the transfer native token with the invalid To Address i.e. missing character while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the incorrect To Address while sign the added transactions to the batch on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); @@ -721,50 +938,47 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: invalidRecipient, // invalid to address - value: ethers.utils.parseEther(value), + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.incorrectRecipient, // incorrect to address + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for To Address is displayed as expected while sign the added transactions to the batch." + 'The validation for To Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch.', ); } } }); - xit("Regression: Perform the transfer native token with the same To Address i.e. sender address while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid To Address i.e. missing character while sign the added transactions to the batch on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); @@ -773,55 +987,96 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: sender, // same to address - value: ethers.utils.parseEther(value), + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.invalidRecipient, // invalid to address + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); - } catch (e) { - console.error(e.error); - assert.fail("The sign transactions added to the batch is not performed."); - } + await arbitrumMainNetSdk.sign(); - // sending to the bundler - let uoHash; - try { - uoHash = await arbitrumMainNetSdk.send(op); + assert.fail( + 'The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch.', + ); } catch (e) { - console.error(e); - assert.fail("The sending to the bundler action is not performed."); + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for To Address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch.', + ); + } } + }); - // get transaction hash + it('REGRESSION: Perform the transfer native token with the same To Address i.e. sender address while sign the added transactions to the batch on the arbitrum network', async () => { + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.sender, // same to address + value: ethers.utils.parseEther(data.value), + }); + } catch (e) { + console.error(e); + assert.fail('The addition of transaction in the batch is not performed.'); + } + + // get balance of the account address try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(uoHash); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The balance of the native token is not displayed.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the invalid recipient while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for Recipient is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the invalid recipient while sign the added transactions to the batch.', + ); + } } }); - it("Regression: Perform the transfer native token with the invalid Value while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid Value while sign the added transactions to the batch on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); @@ -830,31 +1085,30 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseUnits(invalidValue), // invalid value + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseUnits(data.invalidValue), // invalid value }); assert.fail( - "The expected validation is not displayed when entered the invalid value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the invalid value while adding the transactions to the batch.', ); } catch (e) { - if (e.reason === "invalid decimal value") { + if (e.reason === 'invalid decimal value') { console.log( - "The validation for value is displayed as expected while adding the transactions to the batch." + 'The validation for value is displayed as expected while adding the transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the invalid value while adding the transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the very small Value while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the very small Value while sign the added transactions to the batch on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); @@ -863,31 +1117,30 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseUnits(smallValue), // very small value + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseUnits(data.smallValue), // very small value }); assert.fail( - "The expected validation is not displayed when entered the very small value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the very small value while adding the transactions to the batch.', ); } catch (e) { - if (e.reason === "fractional component exceeds decimals") { + if (e.reason === 'fractional component exceeds decimals') { console.log( - "The validation for value is displayed as expected while adding the transactions to the batch." + 'The validation for value is displayed as expected while adding the transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the very small value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the very small value while adding the transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the exceeded Value while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the exceeded Value while sign the added transactions to the batch on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); @@ -896,591 +1149,600 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: exceededValue, // exceeded value + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: data.exceededValue, // exceeded value }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + console.log(e); + if (e.reason === 'Transaction reverted') { console.log( - "The validation for value is displayed as expected while sign the added transactions to the batch." + 'The validation for value is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token without adding transaction to the batch while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token without adding transaction to the batch while sign the added transactions to the batch on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } catch (e) { - if (e.message === "cannot sign empty transaction batch") { + if (e.message === 'cannot sign empty transaction batch') { console.log( - "The validation for transaction batch is displayed as expected while adding the sign transactions to the batch." + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the invalid TxHash i.e. odd number while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid TxHash i.e. odd number while getting the transaction hash on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(oddInvalidTxHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } catch (e) { - if (e.reason === "hex data is odd-length") { + if (e.reason === 'hex data is odd-length') { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the invalid TxHash i.e. even number while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid TxHash i.e. even number while getting the transaction hash on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(evenInvalidTxHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(incorrectTxHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.incorrectTxHash); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer native token with the past TxHash while getting the transaction hash on the arbitrum network', async () => { // clear the transaction batch try { await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await arbitrumMainNetSdk.getNativeBalance(); + await arbitrumMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(pastTxHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.pastTxHash); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid provider netowrk details while Getting the Decimal from ERC20 Contract on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid provider netowrk details while Getting the Decimal from ERC20 Contract on the arbitrum network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider( - invalidProviderNetwork // invalid provider + data.invalidProviderNetwork_arbitrum, // invalid provider ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "could not detect network") { + if (e.reason === 'could not detect network') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without provider netowrk details while Getting the Decimal from ERC20 Contract on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without provider netowrk details while Getting the Decimal from ERC20 Contract on the arbitrum network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider(); // without provider } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "could not detect network") { + if (e.reason === 'could not detect network') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with other provider netowrk details while Getting the Decimal from ERC20 Contract on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with other provider netowrk details while Getting the Decimal from ERC20 Contract on the arbitrum network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider( - otherProviderNetwork // other provider + data.otherProviderNetwork_arbitrum, // other provider ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.code === "CALL_EXCEPTION") { + if (e.code === 'CALL_EXCEPTION') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect Token Address details while Getting the Decimal from ERC20 Contract on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect Token Address details while Getting the Decimal from ERC20 Contract on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { erc20Instance = new ethers.Contract( - incorrectTokenAddress, // incorrect token address + data.incorrectTokenAddress_arbitrumUSDC, // incorrect token address ERC20_ABI, - provider + provider, ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "bad address checksum") { + if (e.reason === 'bad address checksum') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid Token Address i.e. missing character details while Getting the Decimal from ERC20 Contract on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid Token Address i.e. missing character details while Getting the Decimal from ERC20 Contract on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { erc20Instance = new ethers.Contract( - invalidTokenAddress, // invalid token address + data.invalidTokenAddress_arbitrumUSDC, // invalid token address ERC20_ABI, - provider + provider, ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "invalid address") { + if (e.reason === 'invalid address') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with null Token Address details while Getting the Decimal from ERC20 Contract on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with null Token Address details while Getting the Decimal from ERC20 Contract on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface - let erc20Instance; try { - erc20Instance = new ethers.Contract(null, ERC20_ABI, provider); // null token address + new ethers.Contract(null, ERC20_ABI, provider); // null token address assert.fail( - "The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "invalid contract address or ENS name") { + if (e.reason === 'invalid contract address or ENS name') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect transfer method name while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect transfer method name while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1490,51 +1752,57 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData( - "transferr", - [recipient, ethers.utils.parseUnits(value, decimals)] - ); + erc20Instance.interface.encodeFunctionData('transferr', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), + ]); assert.fail( - "The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "no matching function") { + if (e.reason === 'no matching function') { console.log( - "The validation for transfer method name is displayed as expected while Getting the transferFrom encoded data." + 'The validation for transfer method name is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid value while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid value while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1544,51 +1812,57 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(invalidValue, decimals), // invalid value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.invalidValue, decimals), // invalid value ]); assert.fail( - "The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "invalid decimal value") { + if (e.reason === 'invalid decimal value') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with very small value while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with very small value while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1598,51 +1872,57 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(smallValue, decimals), // very small value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.smallValue, decimals), // very small value ]); assert.fail( - "The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "fractional component exceeds decimals") { + if (e.reason === 'fractional component exceeds decimals') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with exceeded value while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with exceeded value while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1652,115 +1932,123 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(exceededValue, decimals), // exceeded value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.exceededValue, decimals), // exceeded value ]); } catch (e) { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the exceeded value while Getting the transferFrom encoded data.', ); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + if (e.reason === 'Transaction reverted') { console.log( - "The validation for value is displayed as expected while sign the added transactions to the batch." + 'The validation for value is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without value while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without value while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ]); + erc20Instance.interface.encodeFunctionData('transfer', [data.recipient]); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "types/values length mismatch") { + if (e.reason === 'types/values length mismatch') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect recipient while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect recipient while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1770,52 +2058,58 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - incorrectRecipient, // incorrect recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.incorrectRecipient, // incorrect recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("bad address checksum")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid recipient i.e. missing character while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid recipient i.e. missing character while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1825,52 +2119,58 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - invalidRecipient, // invalid recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.invalidRecipient, // invalid recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } } }); - xit("REGRESSION: Perform the transfer ERC20 token with same recipient i.e. sender address while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with same recipient i.e. sender address while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1880,52 +2180,58 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - sender, // same recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.sender, // same recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without recipient while Getting the transferFrom encoded data on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without recipient while Getting the transferFrom encoded data on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1935,50 +2241,56 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "types/values length mismatch") { + if (e.reason === 'types/values length mismatch') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the incorrect To Address while adding transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the incorrect To Address while adding transactions to the batch on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1988,21 +2300,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2011,59 +2323,64 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: incorrectTokenAddress, // Incorrect Token Address + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.incorrectTokenAddress_arbitrumUSDC, // Incorrect Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("bad address checksum")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the invalid Token Address i.e. missing character while adding transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid Token Address i.e. missing character while adding transactions to the batch on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2073,21 +2390,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2096,59 +2413,64 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: invalidTokenAddress, // Invalid Token Address + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.invalidTokenAddress_arbitrumUSDC, // Invalid Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the null Token Address while adding transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the null Token Address while adding transactions to the batch on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2158,21 +2480,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2181,59 +2503,64 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ + await arbitrumMainNetSdk.addUserOpsToBatch({ to: null, // Null Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason.includes("invalid address")) { + if (e.reason.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without Token Address while adding transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without Token Address while adding transactions to the batch on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2243,21 +2570,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2266,58 +2593,63 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ + await arbitrumMainNetSdk.addUserOpsToBatch({ data: transactionData, // without tokenAddress }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason.includes("invalid address")) { + if (e.reason.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without transactionData while adding transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without transactionData while adding transactions to the batch on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2327,21 +2659,20 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2350,58 +2681,63 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, // without transactionData + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_arbitrumUSDC, // without transactionData }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + if (e.reason === 'bad response') { console.log( - "The validation for transactionData is displayed as expected while sign the added transactions to the batch." + 'The validation for transactionData is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch.', ); } } }); - it("Regression: Perform the transfer ERC20 token without adding transaction to the batch while sign the added transactions to the batch on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without adding transaction to the batch while sign the added transactions to the batch on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2411,21 +2747,20 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2434,47 +2769,53 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } catch (e) { - if (e.message === "cannot sign empty transaction batch") { + if (e.message === 'cannot sign empty transaction batch') { console.log( - "The validation for transaction batch is displayed as expected while adding the sign transactions to the batch." + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the invalid TxHash i.e. odd number while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid TxHash i.e. odd number while getting the transaction hash on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2484,21 +2825,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2507,68 +2848,73 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_arbitrumUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } catch (e) { - if (e.reason === "hex data is odd-length") { + if (e.reason === 'hex data is odd-length') { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the invalid TxHash i.e. even number while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid TxHash i.e. even number while getting the transaction hash on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2578,21 +2924,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2601,68 +2947,73 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_arbitrumUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the incorrect TxHash while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the incorrect TxHash while getting the transaction hash on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2672,21 +3023,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2695,68 +3046,73 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_arbitrumUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.incorrectTxHash); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the past TxHash while getting the transaction hash on the arbitrum network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the past TxHash while getting the transaction hash on the arbitrum network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_arbitrum, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_arbitrumUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2766,21 +3122,21 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2789,47 +3145,707 @@ describe("The SDK, when transfer a token with arbitrum network on the MainNet", await arbitrumMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await arbitrumMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_arbitrumUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); + await arbitrumMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.pastTxHash); + + assert.fail( + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect Sender Address while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.incorrectSender, // incorrect sender address + data.recipient, + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect sender address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('bad address checksum')) { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect sender address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with invalid Sender Address i.e. missing character while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.invalidSender, // invalid sender address + data.recipient, + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the invalid Sender Address i.e. missing character while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('invalid address')) { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid Sender Address i.e. missing character while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without Sender Address while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.recipient, // not added sender address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when not added the Sender Address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the Sender Address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect Recipient Address while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.incorrectRecipient, // incorrect recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect recipient address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('bad address checksum')) { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect recipient address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with invalid Recipient Address i.e. missing character while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.invalidRecipient, // invalid recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the invalid Recipient Address i.e. missing character while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('invalid address')) { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid Recipient Address i.e. missing character while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without Recipient Address while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, // not added recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when not added the Recipient Address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the Recipient Address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect tokenId while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.incorrectTokenId, // incorrect tokenid + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect tokenId while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'invalid BigNumber string') { + console.log( + 'The validation for tokenId is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect tokenId while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without tokenId while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, // not added tokenid + ]); + + assert.fail( + 'The expected validation is not displayed when not added the tokenid while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for tokenid is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the tokenid while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with same sender address while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.sender, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the same sender address while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for sender address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the same sender address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with same recipient address while creating the NFT Data on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.recipient, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the same recipient address while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for recipient address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the same recipient address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token without adding transaction to the batch while sign the added transactions to the batch on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // get balance of the account address + try { + await arbitrumMainNetSdk.getNativeBalance(); + } catch (e) { + console.error(e); + assert.fail('The balance of the ERC721 NFT Token is not displayed.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', + ); + } catch (e) { + if (e.message === 'cannot sign empty transaction batch') { + console.log( + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the invalid TxHash i.e. odd number while getting the transaction hash on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); + + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } catch (e) { + if (e.reason === 'hex data is odd-length') { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the invalid TxHash i.e. even number while getting the transaction hash on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); + + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the incorrect TxHash while getting the transaction hash on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.incorrectTxHash); + + assert.fail( + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the past TxHash while getting the transaction hash on the arbitrum network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await arbitrumMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await arbitrumMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await arbitrumMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await arbitrumMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await arbitrumMainNetSdk.getUserOpReceipt(data.pastTxHash); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } } diff --git a/test/specs/mainnet/01_TransferringFunds/Matic.spec.js b/test/specs/mainnet/01_TransferringFunds/Matic.spec.js index 00abaa4..b066e2f 100644 --- a/test/specs/mainnet/01_TransferringFunds/Matic.spec.js +++ b/test/specs/mainnet/01_TransferringFunds/Matic.spec.js @@ -1,36 +1,16 @@ -import { PrimeSdk } from "@etherspot/prime-sdk"; -import { ethers } from "ethers"; -import { assert } from "chai"; -import { ERC20_ABI } from "@etherspot/prime-sdk/dist/sdk/helpers/abi/ERC20_ABI.js"; -import * as dotenv from "dotenv"; +import { PrimeSdk } from '@etherspot/prime-sdk'; +import { ethers } from 'ethers'; +import { assert } from 'chai'; +import { ERC20_ABI } from '@etherspot/prime-sdk/dist/sdk/helpers/abi/ERC20_ABI.js'; +import data from '../../../data/testData.json' assert { type: 'json' }; +import abi from '../../../data/NFTabi.json' assert { type: 'json' }; +import * as dotenv from 'dotenv'; dotenv.config(); // init dotenv let maticMainNetSdk; let maticEtherspotWalletAddress; -let sender = "0x97EC9803387fcBc4A238BCeA2C6C1b75438D39C3"; -let recipient = "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B5"; -let incorrectRecipient = "0x71Bec2309AC6BCD5F1D7347468AA6154c2DDb4BB"; -let invalidRecipient = "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B"; -let tokenAddress = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"; -let incorrectTokenAddress = "0x2791Bca1ffde4661ED8AA30C99A7a9449Aa84174"; -let invalidTokenAddress = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa8417"; -let value = "0.00001"; -let invalidValue = "abcd"; -let smallValue = "0.0000000000000000001"; -let exceededValue = "1000000000"; -let providerNetwork = "https://polygon-bundler.etherspot.io"; -let invalidProviderNetwork = "http://polygon-bundler.etherspot.io"; -let otherProviderNetwork = "https://arbitrum-bundler.etherspot.io"; -let oddInvalidTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d444"; -let evenInvalidTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d44"; -let incorrectTxHash = - "0x1a44fe659f1502ff49315722be9c69bd76653baf422bfa30669a3485a52d4446"; -let pastTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d4445"; - -describe("The SDK, when transfer a token with matic network on the MainNet", () => { + +describe('The SDK, when transfer a token with matic network on the MainNet', () => { beforeEach(async () => { // initializating sdk try { @@ -38,14 +18,18 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () chainId: Number(process.env.POLYGON_CHAINID), }); - assert.strictEqual( - maticMainNetSdk.state.walletAddress, - "0xa5494Ed2eB09F37b4b0526a8e4789565c226C84f", - "The EOA Address is not calculated correctly." - ); + try { + assert.strictEqual( + maticMainNetSdk.state.walletAddress, + data.eoaAddress, + 'The EOA Address is not calculated correctly.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); - assert.fail("The SDK is not initialled successfully."); + assert.fail('The SDK is not initialled successfully.'); } // get EtherspotWallet address @@ -53,40 +37,44 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () maticEtherspotWalletAddress = await maticMainNetSdk.getCounterFactualAddress(); - assert.strictEqual( - maticEtherspotWalletAddress, - sender, - "The Etherspot Wallet Address is not calculated correctly." - ); + try { + assert.strictEqual( + maticEtherspotWalletAddress, + data.sender, + 'The Etherspot Wallet Address is not calculated correctly.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); assert.fail( - "The Etherspot Wallet Address is not displayed successfully." + 'The Etherspot Wallet Address is not displayed successfully.', ); } }); - it("SMOKE: Perform the transfer native token with valid details on the matic network", async () => { + it('SMOKE: Perform the transfer native token with valid details on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch let transactionBatch; try { transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); try { assert.isNotEmpty( transactionBatch.to, - "The To Address value is empty in the transaction batch response." + 'The To Address value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); @@ -95,7 +83,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( transactionBatch.data, - "The data value is empty in the transaction batch response." + 'The data value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); @@ -104,14 +92,14 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( transactionBatch.value, - "The value's value is empty in the transaction batch response." + 'The value value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address @@ -122,14 +110,14 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( balance, - "The balance is not number in the get native balance response." + 'The balance is not number in the get native balance response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch @@ -140,8 +128,8 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.strictEqual( op.sender, - sender, - "The send value is not correct in the sign transactions added to the batch response." + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -150,7 +138,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.nonce._hex, - "The hex value of the nonce is empty in the sign transactions added to the batch response." + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -159,7 +147,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.nonce._isBigNumber, - "The isBigNumber value of the nonce is false in the sign transactions added to the batch response." + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -168,7 +156,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.initCode, - "The initCode value is empty in the sign transactions added to the batch response." + 'The initCode value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -177,7 +165,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.callData, - "The callData value is empty in the sign transactions added to the batch response." + 'The callData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -186,7 +174,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.callGasLimit._hex, - "The hex value of the callGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -195,7 +183,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.callGasLimit._isBigNumber, - "The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -204,7 +192,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.verificationGasLimit._hex, - "The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -213,7 +201,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.verificationGasLimit._isBigNumber, - "The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -222,7 +210,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.maxFeePerGas._hex, - "The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -231,7 +219,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.maxFeePerGas._isBigNumber, - "The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -240,7 +228,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.maxPriorityFeePerGas._hex, - "The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -249,7 +237,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.maxPriorityFeePerGas._isBigNumber, - "The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -258,7 +246,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNumber( op.chainId, - "The chainId value is not number in the sign transactions added to the batch response." + 'The chainId value is not number in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -267,7 +255,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.paymasterAndData, - "The paymasterAndData value is empty in the sign transactions added to the batch response." + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -276,7 +264,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.preVerificationGas._hex, - "The hex value of the preVerificationGas is empty in the sign transactions added to the batch response." + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -285,7 +273,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.preVerificationGas._isBigNumber, - "The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -294,14 +282,14 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.signature, - "The signature value is empty in the sign transactions added to the batch response." + 'The signature value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // sending to the bundler @@ -311,53 +299,60 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () assert.isNotEmpty( uoHash, - "The uoHash value is empty in the sending bundler response." + 'The uoHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The sending to the bundler action is not performed."); + assert.fail('The sending to the bundler action is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); + console.log('Waiting for transaction...'); let txHash = await maticMainNetSdk.getUserOpReceipt(uoHash); assert.isNotEmpty( txHash, - "The txHash value is empty in the sending bundler response." + 'The txHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The get transaction hash action is not performed.'); } }); - it("SMOKE: Perform the transfer ERC20 token with valid details on the matic network", async () => { + it('SMOKE: Perform the transfer ERC20 token with valid details on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); try { assert.isTrue( provider._isProvider, - "The isProvider value is false in the provider response." + 'The isProvider value is false in the provider response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -368,7 +363,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( decimals, - "The decimals value is empty in the get decimals from erc20 contract response." + 'The decimals value is empty in the get decimals from erc20 contract response.', ); } catch (e) { console.error(e); @@ -376,22 +371,22 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); try { assert.isNotEmpty( transactionData, - "The decimals value is empty in the get decimals from erc20 contract response." + 'The decimals value is empty in the get decimals from erc20 contract response.', ); } catch (e) { console.error(e); @@ -399,7 +394,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -408,21 +403,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch let userOpsBatch; try { userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + to: data.tokenAddress_maticUSDC, data: transactionData, }); try { assert.isNotEmpty( userOpsBatch.to, - "The To Address value is empty in the transaction batch response." + 'The To Address value is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -431,7 +426,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( userOpsBatch.data, - "The data value is empty in the transaction batch response." + 'The data value is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -439,8 +434,8 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( - userOpsBatch.value._hex, - "The hex value of the userOpsBatch is empty in the sign transactions added to the batch response." + userOpsBatch.value[0]._hex, + 'The hex value of the userOpsBatch is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -448,15 +443,15 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( - userOpsBatch.value._isBigNumber, - "The isBigNumber value of the userOpsBatch is false in the sign transactions added to the batch response." + userOpsBatch.value[0]._isBigNumber, + 'The isBigNumber value of the userOpsBatch is false in the userops batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch @@ -467,8 +462,8 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.strictEqual( op.sender, - sender, - "The send value is not correct in the sign transactions added to the batch response." + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -477,7 +472,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.nonce._hex, - "The hex value of the nonce is empty in the sign transactions added to the batch response." + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -486,7 +481,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.nonce._isBigNumber, - "The isBigNumber value of the nonce is false in the sign transactions added to the batch response." + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -495,7 +490,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.initCode, - "The initCode value is empty in the sign transactions added to the batch response." + 'The initCode value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -504,7 +499,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.callData, - "The callData value is empty in the sign transactions added to the batch response." + 'The callData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -513,7 +508,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.callGasLimit._hex, - "The hex value of the callGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -522,7 +517,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.callGasLimit._isBigNumber, - "The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -531,7 +526,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.verificationGasLimit._hex, - "The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -540,7 +535,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.verificationGasLimit._isBigNumber, - "The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -549,7 +544,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.maxFeePerGas._hex, - "The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -558,7 +553,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.maxFeePerGas._isBigNumber, - "The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -567,7 +562,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.maxPriorityFeePerGas._hex, - "The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -576,7 +571,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.maxPriorityFeePerGas._isBigNumber, - "The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -585,7 +580,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNumber( op.chainId, - "The chainId value is not number in the sign transactions added to the batch response." + 'The chainId value is not number in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -594,7 +589,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.paymasterAndData, - "The paymasterAndData value is empty in the sign transactions added to the batch response." + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -603,7 +598,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.preVerificationGas._hex, - "The hex value of the preVerificationGas is empty in the sign transactions added to the batch response." + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -612,7 +607,7 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isTrue( op.preVerificationGas._isBigNumber, - "The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -621,14 +616,14 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { assert.isNotEmpty( op.signature, - "The signature value is empty in the sign transactions added to the batch response." + 'The signature value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // sending to the bundler @@ -638,55 +633,108 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () assert.isNotEmpty( uoHash, - "The uoHash value is empty in the sending bundler response." + 'The uoHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The sending to the bundler action is not performed."); + assert.fail('The sending to the bundler action is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); + console.log('Waiting for transaction...'); let txHash = await maticMainNetSdk.getUserOpReceipt(uoHash); assert.isNotEmpty( txHash, - "The txHash value is empty in the sending bundler response." + 'The txHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The get transaction hash action is not performed.'); } }); - it("Regression: Perform the transfer native token with the incorrect To Address while sign the added transactions to the batch on the matic network", async () => { - // clear the transaction batch + it('SMOKE: Perform the transfer ERC721 NFT token with valid details on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; try { - await maticMainNetSdk.clearUserOpsFromBatch(); + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + + try { + assert.isNotEmpty( + erc721Data, + 'The erc721 Contract Interface value is empty in the erc721 Contract Interface response.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); } - // add transactions to the batch - let transactionBatch; + // clear the transaction batch try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: incorrectRecipient, // incorrect to address - value: ethers.utils.parseEther(value), - }); + await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The transaction of the batch is not clear correctly.'); } - // get balance of the account address - let balance; + // add transactions to the batch + let userOpsBatch; try { - balance = await maticMainNetSdk.getNativeBalance(); + userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + + try { + assert.isNotEmpty( + userOpsBatch.to[0], + 'The To Address value is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + userOpsBatch.data[0], + 'The data value is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + userOpsBatch.value[0]._hex, + 'The hex value of the userOpsBatch is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + userOpsBatch.value[0]._isBigNumber, + 'The isBigNumber value of the userOpsBatch is false in the userops batch response.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch @@ -694,25 +742,194 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () try { op = await maticMainNetSdk.sign(); - assert.fail( - "The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch." - ); - } catch (e) { - let error = e.reason; - if (error.includes("bad address checksum")) { - console.log( - "The validation for To Address is displayed as expected while sign the added transactions to the batch." + try { + assert.strictEqual( + op.sender, + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); - } else { + } catch (e) { console.error(e); - assert.fail( - "The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch." + } + + try { + assert.isNotEmpty( + op.nonce._hex, + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.nonce._isBigNumber, + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.initCode, + 'The initCode value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.callData, + 'The callData value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.callGasLimit._hex, + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.callGasLimit._isBigNumber, + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.verificationGasLimit._hex, + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.verificationGasLimit._isBigNumber, + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.maxFeePerGas._hex, + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.maxFeePerGas._isBigNumber, + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.maxPriorityFeePerGas._hex, + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.maxPriorityFeePerGas._isBigNumber, + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.paymasterAndData, + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.preVerificationGas._hex, + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.preVerificationGas._isBigNumber, + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.signature, + 'The signature value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); } + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // sending to the bundler + let uoHash; + try { + uoHash = await maticMainNetSdk.send(op); + + assert.isNotEmpty( + uoHash, + 'The uoHash value is empty in the sending bundler response.', + ); + } catch (e) { + console.error(e); + assert.fail('The sending to the bundler action is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + let txHash = await maticMainNetSdk.getUserOpReceipt(uoHash); + + assert.isNotEmpty( + txHash, + 'The txHash value is empty in the sending bundler response.', + ); + } catch (e) { + console.error(e); + assert.fail('The get transaction hash action is not performed.'); } }); - it("Regression: Perform the transfer native token with the invalid To Address i.e. missing character while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the incorrect To Address while sign the added transactions to the batch on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); @@ -721,50 +938,47 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: invalidRecipient, // invalid to address - value: ethers.utils.parseEther(value), + await maticMainNetSdk.addUserOpsToBatch({ + to: data.incorrectRecipient, // incorrect to address + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for To Address is displayed as expected while sign the added transactions to the batch." + 'The validation for To Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch.', ); } } }); - xit("Regression: Perform the transfer native token with the same To Address i.e. sender address while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid To Address i.e. missing character while sign the added transactions to the batch on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); @@ -773,55 +987,96 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: sender, // same to address - value: ethers.utils.parseEther(value), + await maticMainNetSdk.addUserOpsToBatch({ + to: data.invalidRecipient, // invalid to address + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await arbitrumMainNetSdk.sign(); - } catch (e) { - console.error(e.error); - assert.fail("The sign transactions added to the batch is not performed."); - } + await maticMainNetSdk.sign(); - // sending to the bundler - let uoHash; - try { - uoHash = await arbitrumMainNetSdk.send(op); + assert.fail( + 'The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch.', + ); } catch (e) { - console.error(e); - assert.fail("The sending to the bundler action is not performed."); - } - - // get transaction hash + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for To Address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer native token with the same To Address i.e. sender address while sign the added transactions to the batch on the matic network', async () => { + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.sender, // same to address + value: ethers.utils.parseEther(data.value), + }); + } catch (e) { + console.error(e); + assert.fail('The addition of transaction in the batch is not performed.'); + } + + // get balance of the account address try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(uoHash); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The balance of the native token is not displayed.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the invalid recipient while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for Recipient is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the invalid recipient while sign the added transactions to the batch.', + ); + } } }); - it("Regression: Perform the transfer native token with the invalid Value while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid Value while sign the added transactions to the batch on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); @@ -830,31 +1085,30 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseUnits(invalidValue), // invalid value + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseUnits(data.invalidValue), // invalid value }); assert.fail( - "The expected validation is not displayed when entered the invalid value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the invalid value while adding the transactions to the batch.', ); } catch (e) { - if (e.reason === "invalid decimal value") { + if (e.reason === 'invalid decimal value') { console.log( - "The validation for value is displayed as expected while adding the transactions to the batch." + 'The validation for value is displayed as expected while adding the transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the invalid value while adding the transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the very small Value while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the very small Value while sign the added transactions to the batch on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); @@ -863,31 +1117,30 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseUnits(smallValue), // very small value + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseUnits(data.smallValue), // very small value }); assert.fail( - "The expected validation is not displayed when entered the very small value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the very small value while adding the transactions to the batch.', ); } catch (e) { - if (e.reason === "fractional component exceeds decimals") { + if (e.reason === 'fractional component exceeds decimals') { console.log( - "The validation for value is displayed as expected while adding the transactions to the batch." + 'The validation for value is displayed as expected while adding the transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the very small value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the very small value while adding the transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the exceeded Value while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the exceeded Value while sign the added transactions to the batch on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); @@ -896,591 +1149,600 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: exceededValue, // exceeded value + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: data.exceededValue, // exceeded value }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + console.log(e); + if (e.reason === 'Transaction reverted') { console.log( - "The validation for value is displayed as expected while sign the added transactions to the batch." + 'The validation for value is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token without adding transaction to the batch while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer native token without adding transaction to the batch while sign the added transactions to the batch on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } catch (e) { - if (e.message === "cannot sign empty transaction batch") { + if (e.message === 'cannot sign empty transaction batch') { console.log( - "The validation for transaction batch is displayed as expected while adding the sign transactions to the batch." + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the invalid TxHash i.e. odd number while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid TxHash i.e. odd number while getting the transaction hash on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(oddInvalidTxHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } catch (e) { - if (e.reason === "hex data is odd-length") { + if (e.reason === 'hex data is odd-length') { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the invalid TxHash i.e. even number while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid TxHash i.e. even number while getting the transaction hash on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(evenInvalidTxHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(incorrectTxHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.incorrectTxHash); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer native token with the past TxHash while getting the transaction hash on the matic network', async () => { // clear the transaction batch try { await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await maticMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await maticMainNetSdk.getNativeBalance(); + await maticMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(pastTxHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.pastTxHash); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid provider netowrk details while Getting the Decimal from ERC20 Contract on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid provider netowrk details while Getting the Decimal from ERC20 Contract on the matic network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider( - invalidProviderNetwork // invalid provider + data.invalidProviderNetwork_matic, // invalid provider ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "could not detect network") { + if (e.reason === 'could not detect network') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without provider netowrk details while Getting the Decimal from ERC20 Contract on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without provider netowrk details while Getting the Decimal from ERC20 Contract on the matic network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider(); // without provider } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "could not detect network") { + if (e.reason === 'could not detect network') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with other provider netowrk details while Getting the Decimal from ERC20 Contract on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with other provider netowrk details while Getting the Decimal from ERC20 Contract on the matic network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider( - otherProviderNetwork // other provider + data.otherProviderNetwork_matic, // other provider ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.code === "CALL_EXCEPTION") { + if (e.code === 'CALL_EXCEPTION') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect Token Address details while Getting the Decimal from ERC20 Contract on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect Token Address details while Getting the Decimal from ERC20 Contract on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { erc20Instance = new ethers.Contract( - incorrectTokenAddress, // incorrect token address + data.incorrectTokenAddress_maticUSDC, // incorrect token address ERC20_ABI, - provider + provider, ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "bad address checksum") { + if (e.reason === 'bad address checksum') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid Token Address i.e. missing character details while Getting the Decimal from ERC20 Contract on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid Token Address i.e. missing character details while Getting the Decimal from ERC20 Contract on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { erc20Instance = new ethers.Contract( - invalidTokenAddress, // invalid token address + data.invalidTokenAddress_maticUSDC, // invalid token address ERC20_ABI, - provider + provider, ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "invalid address") { + if (e.reason === 'invalid address') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with null Token Address details while Getting the Decimal from ERC20 Contract on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with null Token Address details while Getting the Decimal from ERC20 Contract on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface - let erc20Instance; try { - erc20Instance = new ethers.Contract(null, ERC20_ABI, provider); // null token address + new ethers.Contract(null, ERC20_ABI, provider); // null token address assert.fail( - "The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "invalid contract address or ENS name") { + if (e.reason === 'invalid contract address or ENS name') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect transfer method name while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect transfer method name while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1490,51 +1752,57 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData( - "transferr", - [recipient, ethers.utils.parseUnits(value, decimals)] - ); + erc20Instance.interface.encodeFunctionData('transferr', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), + ]); assert.fail( - "The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "no matching function") { + if (e.reason === 'no matching function') { console.log( - "The validation for transfer method name is displayed as expected while Getting the transferFrom encoded data." + 'The validation for transfer method name is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid value while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid value while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1544,51 +1812,57 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(invalidValue, decimals), // invalid value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.invalidValue, decimals), // invalid value ]); assert.fail( - "The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "invalid decimal value") { + if (e.reason === 'invalid decimal value') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with very small value while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with very small value while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1598,51 +1872,57 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(smallValue, decimals), // very small value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.smallValue, decimals), // very small value ]); assert.fail( - "The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "fractional component exceeds decimals") { + if (e.reason === 'fractional component exceeds decimals') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with exceeded value while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with exceeded value while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1652,115 +1932,123 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(exceededValue, decimals), // exceeded value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.exceededValue, decimals), // exceeded value ]); } catch (e) { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the exceeded value while Getting the transferFrom encoded data.', ); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + if (e.reason === 'Transaction reverted') { console.log( - "The validation for value is displayed as expected while sign the added transactions to the batch." + 'The validation for value is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without value while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without value while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ]); + erc20Instance.interface.encodeFunctionData('transfer', [data.recipient]); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "types/values length mismatch") { + if (e.reason === 'types/values length mismatch') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect recipient while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect recipient while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1770,52 +2058,58 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - incorrectRecipient, // incorrect recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.incorrectRecipient, // incorrect recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("bad address checksum")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid recipient i.e. missing character while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid recipient i.e. missing character while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1825,52 +2119,58 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - invalidRecipient, // invalid recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.invalidRecipient, // invalid recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } } }); - xit("REGRESSION: Perform the transfer ERC20 token with same recipient i.e. sender address while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with same recipient i.e. sender address while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1880,52 +2180,58 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - sender, // same recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.sender, // same recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without recipient while Getting the transferFrom encoded data on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without recipient while Getting the transferFrom encoded data on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1935,50 +2241,56 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "types/values length mismatch") { + if (e.reason === 'types/values length mismatch') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the incorrect To Address while adding transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the incorrect To Address while adding transactions to the batch on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1988,21 +2300,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2011,59 +2323,64 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: incorrectTokenAddress, // Incorrect Token Address + await maticMainNetSdk.addUserOpsToBatch({ + to: data.incorrectTokenAddress_maticUSDC, // Incorrect Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("bad address checksum")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the invalid Token Address i.e. missing character while adding transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid Token Address i.e. missing character while adding transactions to the batch on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2073,21 +2390,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2096,59 +2413,64 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: invalidTokenAddress, // Invalid Token Address + await maticMainNetSdk.addUserOpsToBatch({ + to: data.invalidTokenAddress_maticUSDC, // Invalid Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the null Token Address while adding transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the null Token Address while adding transactions to the batch on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2158,21 +2480,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2181,59 +2503,64 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ + await maticMainNetSdk.addUserOpsToBatch({ to: null, // Null Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason.includes("invalid address")) { + if (e.reason.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without Token Address while adding transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without Token Address while adding transactions to the batch on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2243,21 +2570,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2266,58 +2593,63 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ + await maticMainNetSdk.addUserOpsToBatch({ data: transactionData, // without tokenAddress }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason.includes("invalid address")) { + if (e.reason.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without transactionData while adding transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without transactionData while adding transactions to the batch on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2327,21 +2659,20 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2350,58 +2681,63 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, // without transactionData + await maticMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_maticUSDC, // without transactionData }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + if (e.reason === 'bad response') { console.log( - "The validation for transactionData is displayed as expected while sign the added transactions to the batch." + 'The validation for transactionData is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch.', ); } } }); - it("Regression: Perform the transfer ERC20 token without adding transaction to the batch while sign the added transactions to the batch on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without adding transaction to the batch while sign the added transactions to the batch on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2411,21 +2747,20 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2434,47 +2769,53 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } catch (e) { - if (e.message === "cannot sign empty transaction batch") { + if (e.message === 'cannot sign empty transaction batch') { console.log( - "The validation for transaction batch is displayed as expected while adding the sign transactions to the batch." + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the invalid TxHash i.e. odd number while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid TxHash i.e. odd number while getting the transaction hash on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2484,21 +2825,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2507,68 +2848,73 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await maticMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_maticUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } catch (e) { - if (e.reason === "hex data is odd-length") { + if (e.reason === 'hex data is odd-length') { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the invalid TxHash i.e. even number while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid TxHash i.e. even number while getting the transaction hash on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2578,21 +2924,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2601,68 +2947,73 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await maticMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_maticUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the incorrect TxHash while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the incorrect TxHash while getting the transaction hash on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2672,21 +3023,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2695,68 +3046,73 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await maticMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_maticUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.incorrectTxHash); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the past TxHash while getting the transaction hash on the matic network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the past TxHash while getting the transaction hash on the matic network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_matic, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_maticUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2766,21 +3122,21 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2789,47 +3145,707 @@ describe("The SDK, when transfer a token with matic network on the MainNet", () await maticMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await maticMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await maticMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_maticUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await maticMainNetSdk.sign(); + await maticMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.pastTxHash); + + assert.fail( + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect Sender Address while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.incorrectSender, // incorrect sender address + data.recipient, + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect sender address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('bad address checksum')) { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect sender address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with invalid Sender Address i.e. missing character while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.invalidSender, // invalid sender address + data.recipient, + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the invalid Sender Address i.e. missing character while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('invalid address')) { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid Sender Address i.e. missing character while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without Sender Address while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.recipient, // not added sender address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when not added the Sender Address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the Sender Address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect Recipient Address while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.incorrectRecipient, // incorrect recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect recipient address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('bad address checksum')) { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect recipient address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with invalid Recipient Address i.e. missing character while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.invalidRecipient, // invalid recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the invalid Recipient Address i.e. missing character while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('invalid address')) { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid Recipient Address i.e. missing character while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without Recipient Address while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, // not added recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when not added the Recipient Address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the Recipient Address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect tokenId while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.incorrectTokenId, // incorrect tokenid + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect tokenId while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'invalid BigNumber string') { + console.log( + 'The validation for tokenId is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect tokenId while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without tokenId while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, // not added tokenid + ]); + + assert.fail( + 'The expected validation is not displayed when not added the tokenid while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for tokenid is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the tokenid while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with same sender address while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.sender, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the same sender address while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for sender address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the same sender address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with same recipient address while creating the NFT Data on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.recipient, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the same recipient address while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for recipient address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the same recipient address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token without adding transaction to the batch while sign the added transactions to the batch on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // get balance of the account address + try { + await maticMainNetSdk.getNativeBalance(); + } catch (e) { + console.error(e); + assert.fail('The balance of the ERC721 NFT Token is not displayed.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', + ); + } catch (e) { + if (e.message === 'cannot sign empty transaction batch') { + console.log( + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the invalid TxHash i.e. odd number while getting the transaction hash on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); + + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } catch (e) { + if (e.reason === 'hex data is odd-length') { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the invalid TxHash i.e. even number while getting the transaction hash on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); + + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the incorrect TxHash while getting the transaction hash on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.incorrectTxHash); + + assert.fail( + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the past TxHash while getting the transaction hash on the matic network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await maticMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await maticMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await maticMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await maticMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await maticMainNetSdk.getUserOpReceipt(data.pastTxHash); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } } diff --git a/test/specs/mainnet/01_TransferringFunds/Optimism.spec.js b/test/specs/mainnet/01_TransferringFunds/Optimism.spec.js index a91d230..29b9796 100644 --- a/test/specs/mainnet/01_TransferringFunds/Optimism.spec.js +++ b/test/specs/mainnet/01_TransferringFunds/Optimism.spec.js @@ -1,51 +1,35 @@ -import { PrimeSdk } from "@etherspot/prime-sdk"; -import { ethers } from "ethers"; -import { assert } from "chai"; -import { ERC20_ABI } from "@etherspot/prime-sdk/dist/sdk/helpers/abi/ERC20_ABI.js"; -import * as dotenv from "dotenv"; +import { PrimeSdk } from '@etherspot/prime-sdk'; +import { ethers } from 'ethers'; +import { assert } from 'chai'; +import { ERC20_ABI } from '@etherspot/prime-sdk/dist/sdk/helpers/abi/ERC20_ABI.js'; +import data from '../../../data/testData.json' assert { type: 'json' }; +import abi from '../../../data/NFTabi.json' assert { type: 'json' }; +import * as dotenv from 'dotenv'; dotenv.config(); // init dotenv let optimismMainNetSdk; let optimismEtherspotWalletAddress; -let sender = "0x97EC9803387fcBc4A238BCeA2C6C1b75438D39C3"; -let recipient = "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B5"; -let incorrectRecipient = "0x71Bec2309AC6BCD5F1D7347468AA6154c2DDb4BB"; -let invalidRecipient = "0x71Bec2309cC6BDD5F1D73474688A6154c28Db4B"; -let tokenAddress = "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"; -let incorrectTokenAddress = "0x7FFc764cBcc4f9669b888A7c11490cCa17c31600"; -let invalidTokenAddress = "0x7F5c764cBc14f9669B88837ca1490cCa17c3160"; -let value = "0.00001"; -let invalidValue = "abcd"; -let smallValue = "0.0000000000000000001"; -let exceededValue = "1000000000"; -let providerNetwork = "https://polygon-bundler.etherspot.io"; -let invalidProviderNetwork = "http://polygon-bundler.etherspot.io"; -let otherProviderNetwork = "https://optimism-bundler.etherspot.io"; -let oddInvalidTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d444"; -let evenInvalidTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d44"; -let incorrectTxHash = - "0x1a44fe659f1502ff49315722be9c69bd76653baf422bfa30669a3485a52d4446"; -let pastTxHash = - "0x1a44fe659f15021f49315792be9c69bd76953baf422bfa306f9a3485a52d4445"; - -describe("The SDK, when transfer a token with optimism network on the MainNet", () => { + +describe('The SDK, when transfer a token with optimism network on the MainNet', () => { beforeEach(async () => { // initializating sdk try { optimismMainNetSdk = new PrimeSdk(process.env.PRIVATE_KEY, { - chainId: Number(process.env.POLYGON_CHAINID), + chainId: Number(process.env.OPTIMISM_CHAINID), }); - assert.strictEqual( - optimismMainNetSdk.state.walletAddress, - "0xa5494Ed2eB09F37b4b0526a8e4789565c226C84f", - "The EOA Address is not calculated correctly." - ); + try { + assert.strictEqual( + optimismMainNetSdk.state.walletAddress, + data.eoaAddress, + 'The EOA Address is not calculated correctly.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); - assert.fail("The SDK is not initialled successfully."); + assert.fail('The SDK is not initialled successfully.'); } // get EtherspotWallet address @@ -53,40 +37,44 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", optimismEtherspotWalletAddress = await optimismMainNetSdk.getCounterFactualAddress(); - assert.strictEqual( - optimismEtherspotWalletAddress, - sender, - "The Etherspot Wallet Address is not calculated correctly." - ); + try { + assert.strictEqual( + optimismEtherspotWalletAddress, + data.sender, + 'The Etherspot Wallet Address is not calculated correctly.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); assert.fail( - "The Etherspot Wallet Address is not displayed successfully." + 'The Etherspot Wallet Address is not displayed successfully.', ); } }); - it("SMOKE: Perform the transfer native token with valid details on the optimism network", async () => { + it('SMOKE: Perform the transfer native token with valid details on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch let transactionBatch; try { transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); try { assert.isNotEmpty( transactionBatch.to, - "The To Address value is empty in the transaction batch response." + 'The To Address value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); @@ -95,7 +83,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( transactionBatch.data, - "The data value is empty in the transaction batch response." + 'The data value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); @@ -104,14 +92,14 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( transactionBatch.value, - "The value's value is empty in the transaction batch response." + 'The value value is empty in the add transactions to batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address @@ -122,14 +110,14 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( balance, - "The balance is not number in the get native balance response." + 'The balance is not number in the get native balance response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch @@ -140,8 +128,8 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.strictEqual( op.sender, - sender, - "The send value is not correct in the sign transactions added to the batch response." + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -150,7 +138,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.nonce._hex, - "The hex value of the nonce is empty in the sign transactions added to the batch response." + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -159,7 +147,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.nonce._isBigNumber, - "The isBigNumber value of the nonce is false in the sign transactions added to the batch response." + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -168,7 +156,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.initCode, - "The initCode value is empty in the sign transactions added to the batch response." + 'The initCode value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -177,7 +165,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.callData, - "The callData value is empty in the sign transactions added to the batch response." + 'The callData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -186,7 +174,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.callGasLimit._hex, - "The hex value of the callGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -195,7 +183,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.callGasLimit._isBigNumber, - "The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -204,7 +192,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.verificationGasLimit._hex, - "The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -213,7 +201,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.verificationGasLimit._isBigNumber, - "The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -222,7 +210,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.maxFeePerGas._hex, - "The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -231,7 +219,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.maxFeePerGas._isBigNumber, - "The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -240,7 +228,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.maxPriorityFeePerGas._hex, - "The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -249,7 +237,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.maxPriorityFeePerGas._isBigNumber, - "The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -258,7 +246,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNumber( op.chainId, - "The chainId value is not number in the sign transactions added to the batch response." + 'The chainId value is not number in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -267,7 +255,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.paymasterAndData, - "The paymasterAndData value is empty in the sign transactions added to the batch response." + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -276,7 +264,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.preVerificationGas._hex, - "The hex value of the preVerificationGas is empty in the sign transactions added to the batch response." + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -285,7 +273,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.preVerificationGas._isBigNumber, - "The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -294,14 +282,14 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.signature, - "The signature value is empty in the sign transactions added to the batch response." + 'The signature value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // sending to the bundler @@ -311,53 +299,60 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", assert.isNotEmpty( uoHash, - "The uoHash value is empty in the sending bundler response." + 'The uoHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The sending to the bundler action is not performed."); + assert.fail('The sending to the bundler action is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); + console.log('Waiting for transaction...'); let txHash = await optimismMainNetSdk.getUserOpReceipt(uoHash); assert.isNotEmpty( txHash, - "The txHash value is empty in the sending bundler response." + 'The txHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The get transaction hash action is not performed.'); } }); - it("SMOKE: Perform the transfer ERC20 token with valid details on the optimism network", async () => { + it('SMOKE: Perform the transfer ERC20 token with valid details on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); try { assert.isTrue( provider._isProvider, - "The isProvider value is false in the provider response." + 'The isProvider value is false in the provider response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -368,7 +363,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( decimals, - "The decimals value is empty in the get decimals from erc20 contract response." + 'The decimals value is empty in the get decimals from erc20 contract response.', ); } catch (e) { console.error(e); @@ -376,22 +371,22 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); try { assert.isNotEmpty( transactionData, - "The decimals value is empty in the get decimals from erc20 contract response." + 'The decimals value is empty in the get decimals from erc20 contract response.', ); } catch (e) { console.error(e); @@ -399,7 +394,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -408,21 +403,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch let userOpsBatch; try { userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + to: data.tokenAddress_optimismUSDC, data: transactionData, }); try { assert.isNotEmpty( userOpsBatch.to, - "The To Address value is empty in the transaction batch response." + 'The To Address value is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -431,7 +426,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( userOpsBatch.data, - "The data value is empty in the transaction batch response." + 'The data value is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -439,8 +434,8 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( - userOpsBatch.value._hex, - "The hex value of the userOpsBatch is empty in the sign transactions added to the batch response." + userOpsBatch.value[0]._hex, + 'The hex value of the userOpsBatch is empty in the userops batch response.', ); } catch (e) { console.error(e); @@ -448,15 +443,15 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( - userOpsBatch.value._isBigNumber, - "The isBigNumber value of the userOpsBatch is false in the sign transactions added to the batch response." + userOpsBatch.value[0]._isBigNumber, + 'The isBigNumber value of the userOpsBatch is false in the userops batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch @@ -467,8 +462,8 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.strictEqual( op.sender, - sender, - "The send value is not correct in the sign transactions added to the batch response." + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -477,7 +472,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.nonce._hex, - "The hex value of the nonce is empty in the sign transactions added to the batch response." + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -486,7 +481,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.nonce._isBigNumber, - "The isBigNumber value of the nonce is false in the sign transactions added to the batch response." + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -495,7 +490,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.initCode, - "The initCode value is empty in the sign transactions added to the batch response." + 'The initCode value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -504,7 +499,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.callData, - "The callData value is empty in the sign transactions added to the batch response." + 'The callData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -513,7 +508,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.callGasLimit._hex, - "The hex value of the callGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -522,7 +517,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.callGasLimit._isBigNumber, - "The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -531,7 +526,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.verificationGasLimit._hex, - "The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response." + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -540,7 +535,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.verificationGasLimit._isBigNumber, - "The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response." + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -549,7 +544,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.maxFeePerGas._hex, - "The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -558,7 +553,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.maxFeePerGas._isBigNumber, - "The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -567,7 +562,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.maxPriorityFeePerGas._hex, - "The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response." + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -576,7 +571,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.maxPriorityFeePerGas._isBigNumber, - "The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -585,7 +580,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNumber( op.chainId, - "The chainId value is not number in the sign transactions added to the batch response." + 'The chainId value is not number in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -594,7 +589,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.paymasterAndData, - "The paymasterAndData value is empty in the sign transactions added to the batch response." + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -603,7 +598,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.preVerificationGas._hex, - "The hex value of the preVerificationGas is empty in the sign transactions added to the batch response." + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -612,7 +607,7 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isTrue( op.preVerificationGas._isBigNumber, - "The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response." + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); @@ -621,14 +616,14 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { assert.isNotEmpty( op.signature, - "The signature value is empty in the sign transactions added to the batch response." + 'The signature value is empty in the sign transactions added to the batch response.', ); } catch (e) { console.error(e); } } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // sending to the bundler @@ -638,55 +633,108 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", assert.isNotEmpty( uoHash, - "The uoHash value is empty in the sending bundler response." + 'The uoHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The sending to the bundler action is not performed."); + assert.fail('The sending to the bundler action is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); + console.log('Waiting for transaction...'); let txHash = await optimismMainNetSdk.getUserOpReceipt(uoHash); assert.isNotEmpty( txHash, - "The txHash value is empty in the sending bundler response." + 'The txHash value is empty in the sending bundler response.', ); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The get transaction hash action is not performed.'); } }); - it("Regression: Perform the transfer native token with the incorrect To Address while sign the added transactions to the batch on the optimism network", async () => { - // clear the transaction batch + it('SMOKE: Perform the transfer ERC721 NFT token with valid details on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; try { - await optimismMainNetSdk.clearUserOpsFromBatch(); + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + + try { + assert.isNotEmpty( + erc721Data, + 'The erc721 Contract Interface value is empty in the erc721 Contract Interface response.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); } - // add transactions to the batch - let transactionBatch; + // clear the transaction batch try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: incorrectRecipient, // incorrect to address - value: ethers.utils.parseEther(value), - }); + await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The transaction of the batch is not clear correctly.'); } - // get balance of the account address - let balance; + // add transactions to the batch + let userOpsBatch; try { - balance = await optimismMainNetSdk.getNativeBalance(); + userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + + try { + assert.isNotEmpty( + userOpsBatch.to[0], + 'The To Address value is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + userOpsBatch.data[0], + 'The data value is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + userOpsBatch.value[0]._hex, + 'The hex value of the userOpsBatch is empty in the userops batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + userOpsBatch.value[0]._isBigNumber, + 'The isBigNumber value of the userOpsBatch is false in the userops batch response.', + ); + } catch (e) { + console.error(e); + } } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch @@ -694,25 +742,194 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", try { op = await optimismMainNetSdk.sign(); - assert.fail( - "The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch." - ); - } catch (e) { - let error = e.reason; - if (error.includes("bad address checksum")) { - console.log( - "The validation for To Address is displayed as expected while sign the added transactions to the batch." + try { + assert.strictEqual( + op.sender, + data.sender, + 'The send value is not correct in the sign transactions added to the batch response.', ); - } else { + } catch (e) { console.error(e); - assert.fail( - "The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch." + } + + try { + assert.isNotEmpty( + op.nonce._hex, + 'The hex value of the nonce is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.nonce._isBigNumber, + 'The isBigNumber value of the nonce is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.initCode, + 'The initCode value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.callData, + 'The callData value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.callGasLimit._hex, + 'The hex value of the callGasLimit is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.callGasLimit._isBigNumber, + 'The isBigNumber value of the callGasLimit is false in the sign transactions added to the batch response.', ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.verificationGasLimit._hex, + 'The hex value of the verificationGasLimit is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.verificationGasLimit._isBigNumber, + 'The isBigNumber value of the verificationGasLimit is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.maxFeePerGas._hex, + 'The hex value of the maxFeePerGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.maxFeePerGas._isBigNumber, + 'The isBigNumber value of the maxFeePerGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.maxPriorityFeePerGas._hex, + 'The hex value of the maxPriorityFeePerGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.maxPriorityFeePerGas._isBigNumber, + 'The isBigNumber value of the maxPriorityFeePerGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.paymasterAndData, + 'The paymasterAndData value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.preVerificationGas._hex, + 'The hex value of the preVerificationGas is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isTrue( + op.preVerificationGas._isBigNumber, + 'The isBigNumber value of the preVerificationGas is false in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); + } + + try { + assert.isNotEmpty( + op.signature, + 'The signature value is empty in the sign transactions added to the batch response.', + ); + } catch (e) { + console.error(e); } + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // sending to the bundler + let uoHash; + try { + uoHash = await optimismMainNetSdk.send(op); + + assert.isNotEmpty( + uoHash, + 'The uoHash value is empty in the sending bundler response.', + ); + } catch (e) { + console.error(e); + assert.fail('The sending to the bundler action is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + let txHash = await optimismMainNetSdk.getUserOpReceipt(uoHash); + + assert.isNotEmpty( + txHash, + 'The txHash value is empty in the sending bundler response.', + ); + } catch (e) { + console.error(e); + assert.fail('The get transaction hash action is not performed.'); } }); - it("Regression: Perform the transfer native token with the invalid To Address i.e. missing character while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the incorrect To Address while sign the added transactions to the batch on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); @@ -721,50 +938,47 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: invalidRecipient, // invalid to address - value: ethers.utils.parseEther(value), + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.incorrectRecipient, // incorrect to address + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for To Address is displayed as expected while sign the added transactions to the batch." + 'The validation for To Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect To Address while sign the added transactions to the batch.', ); } } }); - xit("Regression: Perform the transfer native token with the same To Address i.e. sender address while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid To Address i.e. missing character while sign the added transactions to the batch on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); @@ -773,55 +987,96 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: sender, // same to address - value: ethers.utils.parseEther(value), + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.invalidRecipient, // invalid to address + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); - } catch (e) { - console.error(e.error); - assert.fail("The sign transactions added to the batch is not performed."); - } + await optimismMainNetSdk.sign(); - // sending to the bundler - let uoHash; - try { - uoHash = await optimismMainNetSdk.send(op); + assert.fail( + 'The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch.', + ); } catch (e) { - console.error(e); - assert.fail("The sending to the bundler action is not performed."); + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for To Address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the invalid To Address while sign the added transactions to the batch.', + ); + } } + }); - // get transaction hash + it('REGRESSION: Perform the transfer native token with the same To Address i.e. sender address while sign the added transactions to the batch on the optimism network', async () => { + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.sender, // same to address + value: ethers.utils.parseEther(data.value), + }); + } catch (e) { + console.error(e); + assert.fail('The addition of transaction in the batch is not performed.'); + } + + // get balance of the account address try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(uoHash); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The get transaction hash action is not performed."); + assert.fail('The balance of the native token is not displayed.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the invalid recipient while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for Recipient is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the invalid recipient while sign the added transactions to the batch.', + ); + } } }); - it("Regression: Perform the transfer native token with the invalid Value while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid Value while sign the added transactions to the batch on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); @@ -830,31 +1085,30 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseUnits(invalidValue), // invalid value + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseUnits(data.invalidValue), // invalid value }); assert.fail( - "The expected validation is not displayed when entered the invalid value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the invalid value while adding the transactions to the batch.', ); } catch (e) { - if (e.reason === "invalid decimal value") { + if (e.reason === 'invalid decimal value') { console.log( - "The validation for value is displayed as expected while adding the transactions to the batch." + 'The validation for value is displayed as expected while adding the transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the invalid value while adding the transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the very small Value while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the very small Value while sign the added transactions to the batch on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); @@ -863,31 +1117,30 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseUnits(smallValue), // very small value + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseUnits(data.smallValue), // very small value }); assert.fail( - "The expected validation is not displayed when entered the very small value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the very small value while adding the transactions to the batch.', ); } catch (e) { - if (e.reason === "fractional component exceeds decimals") { + if (e.reason === 'fractional component exceeds decimals') { console.log( - "The validation for value is displayed as expected while adding the transactions to the batch." + 'The validation for value is displayed as expected while adding the transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the very small value while adding the transactions to the batch." + 'The expected validation is not displayed when entered the very small value while adding the transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the exceeded Value while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the exceeded Value while sign the added transactions to the batch on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); @@ -896,591 +1149,600 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: exceededValue, // exceeded value + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: data.exceededValue, // exceeded value }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + console.log(e); + if (e.reason === 'Transaction reverted') { console.log( - "The validation for value is displayed as expected while sign the added transactions to the batch." + 'The validation for value is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token without adding transaction to the batch while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token without adding transaction to the batch while sign the added transactions to the batch on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } catch (e) { - if (e.message === "cannot sign empty transaction batch") { + if (e.message === 'cannot sign empty transaction batch') { console.log( - "The validation for transaction batch is displayed as expected while adding the sign transactions to the batch." + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } } }); - it("Regression: Perform the transfer native token with the invalid TxHash i.e. odd number while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid TxHash i.e. odd number while getting the transaction hash on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(oddInvalidTxHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } catch (e) { - if (e.reason === "hex data is odd-length") { + if (e.reason === 'hex data is odd-length') { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the invalid TxHash i.e. even number while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the invalid TxHash i.e. even number while getting the transaction hash on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(evenInvalidTxHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(incorrectTxHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.incorrectTxHash); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer native token with the incorrect TxHash while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer native token with the past TxHash while getting the transaction hash on the optimism network', async () => { // clear the transaction batch try { await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let transactionBatch; try { - transactionBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: recipient, - value: ethers.utils.parseEther(value), + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.recipient, + value: ethers.utils.parseEther(data.value), }); } catch (e) { console.error(e); - assert.fail("The addition of transaction in the batch is not performed."); + assert.fail('The addition of transaction in the batch is not performed.'); } // get balance of the account address - let balance; try { - balance = await optimismMainNetSdk.getNativeBalance(); + await optimismMainNetSdk.getNativeBalance(); } catch (e) { console.error(e); - assert.fail("The balance of the native token is not displayed."); + assert.fail('The balance of the native token is not displayed.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(pastTxHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.pastTxHash); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid provider netowrk details while Getting the Decimal from ERC20 Contract on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid provider netowrk details while Getting the Decimal from ERC20 Contract on the optimism network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider( - invalidProviderNetwork // invalid provider + data.invalidProviderNetwork_optimism, // invalid provider ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "could not detect network") { + if (e.reason === 'could not detect network') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without provider netowrk details while Getting the Decimal from ERC20 Contract on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without provider netowrk details while Getting the Decimal from ERC20 Contract on the optimism network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider(); // without provider } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "could not detect network") { + if (e.reason === 'could not detect network') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with other provider netowrk details while Getting the Decimal from ERC20 Contract on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with other provider netowrk details while Getting the Decimal from ERC20 Contract on the optimism network', async () => { + // get the respective provider details let provider; try { provider = new ethers.providers.JsonRpcProvider( - otherProviderNetwork // other provider + data.otherProviderNetwork_optimism, // other provider ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.code === "CALL_EXCEPTION") { + if (e.code === 'CALL_EXCEPTION') { console.log( - "The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Provider Network is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the other Provider Network while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect Token Address details while Getting the Decimal from ERC20 Contract on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect Token Address details while Getting the Decimal from ERC20 Contract on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { erc20Instance = new ethers.Contract( - incorrectTokenAddress, // incorrect token address + data.incorrectTokenAddress_optimismUSDC, // incorrect token address ERC20_ABI, - provider + provider, ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "bad address checksum") { + if (e.reason === 'bad address checksum') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the incorrect Token Address while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid Token Address i.e. missing character details while Getting the Decimal from ERC20 Contract on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid Token Address i.e. missing character details while Getting the Decimal from ERC20 Contract on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { erc20Instance = new ethers.Contract( - invalidTokenAddress, // invalid token address + data.invalidTokenAddress_optimismUSDC, // invalid token address ERC20_ABI, - provider + provider, ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "invalid address") { + if (e.reason === 'invalid address') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the invalid Token Address i.e. missing character while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with null Token Address details while Getting the Decimal from ERC20 Contract on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with null Token Address details while Getting the Decimal from ERC20 Contract on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface - let erc20Instance; try { - erc20Instance = new ethers.Contract(null, ERC20_ABI, provider); // null token address + new ethers.Contract(null, ERC20_ABI, provider); // null token address assert.fail( - "The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract.', ); } catch (e) { - if (e.reason === "invalid contract address or ENS name") { + if (e.reason === 'invalid contract address or ENS name') { console.log( - "The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract." + 'The validation for Token Address is displayed as expected while Getting the Decimal from ERC20 Contract.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract." + 'The expected validation is not displayed when entered the null Token Address while Getting the Decimal from ERC20 Contract.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect transfer method name while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect transfer method name while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1490,51 +1752,57 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData( - "transferr", - [recipient, ethers.utils.parseUnits(value, decimals)] - ); + erc20Instance.interface.encodeFunctionData('transferr', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), + ]); assert.fail( - "The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "no matching function") { + if (e.reason === 'no matching function') { console.log( - "The validation for transfer method name is displayed as expected while Getting the transferFrom encoded data." + 'The validation for transfer method name is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect transfer method name while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid value while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid value while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1544,51 +1812,57 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(invalidValue, decimals), // invalid value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.invalidValue, decimals), // invalid value ]); assert.fail( - "The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "invalid decimal value") { + if (e.reason === 'invalid decimal value') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with very small value while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with very small value while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1598,51 +1872,57 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(smallValue, decimals), // very small value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.smallValue, decimals), // very small value ]); assert.fail( - "The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "fractional component exceeds decimals") { + if (e.reason === 'fractional component exceeds decimals') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the very small value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with exceeded value while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with exceeded value while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1652,115 +1932,123 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(exceededValue, decimals), // exceeded value + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.exceededValue, decimals), // exceeded value ]); } catch (e) { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the exceeded value while Getting the transferFrom encoded data.', ); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + if (e.reason === 'Transaction reverted') { console.log( - "The validation for value is displayed as expected while sign the added transactions to the batch." + 'The validation for value is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the exceeded value while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without value while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without value while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract - let decimals; try { - decimals = await erc20Instance.functions.decimals(); + await erc20Instance.functions.decimals(); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ]); + erc20Instance.interface.encodeFunctionData('transfer', [data.recipient]); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "types/values length mismatch") { + if (e.reason === 'types/values length mismatch') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with incorrect recipient while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with incorrect recipient while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1770,52 +2058,58 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - incorrectRecipient, // incorrect recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.incorrectRecipient, // incorrect recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("bad address checksum")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the incorrect recipient while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with invalid recipient i.e. missing character while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with invalid recipient i.e. missing character while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1825,52 +2119,58 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - invalidRecipient, // invalid recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.invalidRecipient, // invalid recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } } }); - xit("REGRESSION: Perform the transfer ERC20 token with same recipient i.e. sender address while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with same recipient i.e. sender address while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1880,52 +2180,58 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - sender, // same recipient address - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.sender, // same recipient address + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Recipient is displayed as expected while Getting the transferFrom encoded data." + 'The validation for Recipient is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data." + 'The expected validation is not displayed when entered the invalid recipient while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without recipient while Getting the transferFrom encoded data on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without recipient while Getting the transferFrom encoded data on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1935,50 +2241,56 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + ethers.utils.parseUnits(data.value, decimals), ]); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } catch (e) { - if (e.reason === "types/values length mismatch") { + if (e.reason === 'types/values length mismatch') { console.log( - "The validation for value is displayed as expected while Getting the transferFrom encoded data." + 'The validation for value is displayed as expected while Getting the transferFrom encoded data.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data." + 'The expected validation is not displayed when not entered the value while Getting the transferFrom encoded data.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the incorrect To Address while adding transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the incorrect To Address while adding transactions to the batch on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -1988,21 +2300,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2011,59 +2323,64 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: incorrectTokenAddress, // Incorrect Token Address + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.incorrectTokenAddress_optimismUSDC, // Incorrect Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("bad address checksum")) { + if (error.includes('bad address checksum')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the incorrect Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the invalid Token Address i.e. missing character while adding transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid Token Address i.e. missing character while adding transactions to the batch on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2073,21 +2390,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2096,59 +2413,64 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: invalidTokenAddress, // Invalid Token Address + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.invalidTokenAddress_optimismUSDC, // Invalid Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch.', ); } catch (e) { let error = e.reason; - if (error.includes("invalid address")) { + if (error.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the invalid Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token with the null Token Address while adding transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the null Token Address while adding transactions to the batch on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2158,21 +2480,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2181,59 +2503,64 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ + await optimismMainNetSdk.addUserOpsToBatch({ to: null, // Null Token Address data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason.includes("invalid address")) { + if (e.reason.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when entered the null Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without Token Address while adding transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without Token Address while adding transactions to the batch on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2243,21 +2570,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2266,58 +2593,63 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ + await optimismMainNetSdk.addUserOpsToBatch({ data: transactionData, // without tokenAddress }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason.includes("invalid address")) { + if (e.reason.includes('invalid address')) { console.log( - "The validation for Token Address is displayed as expected while sign the added transactions to the batch." + 'The validation for Token Address is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the Token Address while sign the added transactions to the batch.', ); } } }); - it("REGRESSION: Perform the transfer ERC20 token without transactionData while adding transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without transactionData while adding transactions to the batch on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2327,21 +2659,20 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2350,58 +2681,63 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, // without transactionData + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_optimismUSDC, // without transactionData }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch.', ); } catch (e) { - if (e.reason === "bad response") { + if (e.reason === 'bad response') { console.log( - "The validation for transactionData is displayed as expected while sign the added transactions to the batch." + 'The validation for transactionData is displayed as expected while sign the added transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch." + 'The expected validation is not displayed when not entered the transactionData while sign the added transactions to the batch.', ); } } }); - it("Regression: Perform the transfer ERC20 token without adding transaction to the batch while sign the added transactions to the batch on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token without adding transaction to the batch while sign the added transactions to the batch on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2411,21 +2747,20 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data - let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2434,47 +2769,53 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } catch (e) { - if (e.message === "cannot sign empty transaction batch") { + if (e.message === 'cannot sign empty transaction batch') { console.log( - "The validation for transaction batch is displayed as expected while adding the sign transactions to the batch." + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch." + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the invalid TxHash i.e. odd number while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid TxHash i.e. odd number while getting the transaction hash on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2484,21 +2825,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2507,68 +2848,73 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_optimismUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } catch (e) { - if (e.reason === "hex data is odd-length") { + if (e.reason === 'hex data is odd-length') { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the invalid TxHash i.e. even number while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the invalid TxHash i.e. even number while getting the transaction hash on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2578,21 +2924,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2601,68 +2947,73 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_optimismUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash." + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the incorrect TxHash while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the incorrect TxHash while getting the transaction hash on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2672,21 +3023,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2695,68 +3046,73 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_optimismUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.incorrectTxHash); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', ); } } }); - it("Regression: Perform the transfer ERC20 token with the past TxHash while getting the transaction hash on the optimism network", async () => { + it('REGRESSION: Perform the transfer ERC20 token with the past TxHash while getting the transaction hash on the optimism network', async () => { + // get the respective provider details let provider; try { - provider = new ethers.providers.JsonRpcProvider(providerNetwork); + provider = new ethers.providers.JsonRpcProvider( + data.providerNetwork_optimism, + ); } catch (e) { console.error(e); - assert.fail("The provider response is not displayed correctly."); + assert.fail('The provider response is not displayed correctly.'); } // get erc20 Contract Interface let erc20Instance; try { - erc20Instance = new ethers.Contract(tokenAddress, ERC20_ABI, provider); + erc20Instance = new ethers.Contract( + data.tokenAddress_optimismUSDC, + ERC20_ABI, + provider, + ); } catch (e) { console.error(e); - assert.fail("The get erc20 Contract Interface is not performed."); + assert.fail('The get erc20 Contract Interface is not performed.'); } // get decimals from erc20 contract @@ -2766,21 +3122,21 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } // get transferFrom encoded data let transactionData; try { - transactionData = erc20Instance.interface.encodeFunctionData("transfer", [ - recipient, - ethers.utils.parseUnits(value, decimals), + transactionData = erc20Instance.interface.encodeFunctionData('transfer', [ + data.recipient, + ethers.utils.parseUnits(data.value, decimals), ]); } catch (e) { console.error(e); assert.fail( - "The decimals from erc20 contract is not displayed correctly." + 'The decimals from erc20 contract is not displayed correctly.', ); } @@ -2789,47 +3145,707 @@ describe("The SDK, when transfer a token with optimism network on the MainNet", await optimismMainNetSdk.clearUserOpsFromBatch(); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // add transactions to the batch - let userOpsBatch; try { - userOpsBatch = await optimismMainNetSdk.addUserOpsToBatch({ - to: tokenAddress, + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.tokenAddress_optimismUSDC, data: transactionData, }); } catch (e) { console.error(e); - assert.fail("The transaction of the batch is not clear correctly."); + assert.fail('The transaction of the batch is not clear correctly.'); } // sign transactions added to the batch - let op; try { - op = await optimismMainNetSdk.sign(); + await optimismMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.pastTxHash); + + assert.fail( + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect Sender Address while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.incorrectSender, // incorrect sender address + data.recipient, + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect sender address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('bad address checksum')) { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect sender address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with invalid Sender Address i.e. missing character while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.invalidSender, // invalid sender address + data.recipient, + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the invalid Sender Address i.e. missing character while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('invalid address')) { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid Sender Address i.e. missing character while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without Sender Address while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.recipient, // not added sender address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when not added the Sender Address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for sender address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the Sender Address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect Recipient Address while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.incorrectRecipient, // incorrect recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect recipient address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('bad address checksum')) { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect recipient address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with invalid Recipient Address i.e. missing character while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.invalidRecipient, // invalid recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when added the invalid Recipient Address i.e. missing character while creating the NFT Data.', + ); + } catch (e) { + if (e.reason.includes('invalid address')) { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid Recipient Address i.e. missing character while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without Recipient Address while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, // not added recipient address + data.tokenId, + ]); + + assert.fail( + 'The expected validation is not displayed when not added the Recipient Address while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for recipient address is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the Recipient Address while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with incorrect tokenId while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.incorrectTokenId, // incorrect tokenid + ]); + + assert.fail( + 'The expected validation is not displayed when added the incorrect tokenId while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'invalid BigNumber string') { + console.log( + 'The validation for tokenId is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect tokenId while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token without tokenId while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, // not added tokenid + ]); + + assert.fail( + 'The expected validation is not displayed when not added the tokenid while creating the NFT Data.', + ); + } catch (e) { + if (e.reason === 'types/values length mismatch') { + console.log( + 'The validation for tokenid is displayed as expected while creating the NFT Data.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the tokenid while creating the NFT Data.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with same sender address while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.sender, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the same sender address while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for sender address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the same sender address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT token with same recipient address while creating the NFT Data on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.recipient, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when entered the same recipient address while sign the added transactions to the batch.', + ); + } catch (e) { + let error = e.reason; + if (error.includes('invalid address')) { + console.log( + 'The validation for recipient address is displayed as expected while sign the added transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when entered the same recipient address while sign the added transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token without adding transaction to the batch while sign the added transactions to the batch on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // get balance of the account address + try { + await optimismMainNetSdk.getNativeBalance(); + } catch (e) { + console.error(e); + assert.fail('The balance of the ERC721 NFT Token is not displayed.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + + assert.fail( + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', + ); + } catch (e) { + if (e.message === 'cannot sign empty transaction batch') { + console.log( + 'The validation for transaction batch is displayed as expected while adding the sign transactions to the batch.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when not added the transaction to the batch while adding the sign transactions to the batch.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the invalid TxHash i.e. odd number while getting the transaction hash on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.oddInvalidTxHash); + + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } catch (e) { + if (e.reason === 'hex data is odd-length') { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the invalid TxHash i.e. even number while getting the transaction hash on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.evenInvalidTxHash); + + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. even number while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the invalid TxHash i.e. odd number while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the incorrect TxHash while getting the transaction hash on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); + } catch (e) { + console.error(e); + assert.fail('The sign transactions added to the batch is not performed.'); + } + + // get transaction hash + try { + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.incorrectTxHash); + + assert.fail( + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', + ); + } catch (e) { + if (e.showDiff === false) { + console.log( + 'The validation for transaction is displayed as expected while getting the transaction hash.', + ); + } else { + console.error(e); + assert.fail( + 'The expected validation is not displayed when added the incorrect TxHash while getting the transaction hash.', + ); + } + } + }); + + it('REGRESSION: Perform the transfer ERC721 NFT Token with the past TxHash while getting the transaction hash on the optimism network', async () => { + // get erc721 Contract Interface + let erc721Interface; + let erc721Data; + try { + erc721Interface = new ethers.utils.Interface(abi.abi); + + erc721Data = erc721Interface.encodeFunctionData('transferFrom', [ + data.sender, + data.recipient, + data.tokenId, + ]); + } catch (e) { + console.error(e); + assert.fail('The get erc721 Contract Interface is not performed.'); + } + + // clear the transaction batch + try { + await optimismMainNetSdk.clearUserOpsFromBatch(); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // add transactions to the batch + try { + await optimismMainNetSdk.addUserOpsToBatch({ + to: data.nft_tokenAddress, + data: erc721Data, + }); + } catch (e) { + console.error(e); + assert.fail('The transaction of the batch is not clear correctly.'); + } + + // sign transactions added to the batch + try { + await optimismMainNetSdk.sign(); } catch (e) { console.error(e); - assert.fail("The sign transactions added to the batch is not performed."); + assert.fail('The sign transactions added to the batch is not performed.'); } // get transaction hash try { - console.log("Waiting for transaction..."); - await optimismMainNetSdk.getUserOpReceipt(uoHash); + console.log('Waiting for transaction...'); + await optimismMainNetSdk.getUserOpReceipt(data.pastTxHash); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } catch (e) { if (e.showDiff === false) { console.log( - "The validation for transaction is displayed as expected while getting the transaction hash." + 'The validation for transaction is displayed as expected while getting the transaction hash.', ); } else { console.error(e); assert.fail( - "The expected validation is not displayed when added the past TxHash while getting the transaction hash." + 'The expected validation is not displayed when added the past TxHash while getting the transaction hash.', ); } } diff --git a/test/utils/Helper.js b/test/utils/Helper.js index 5862ba0..0514ecb 100644 --- a/test/utils/Helper.js +++ b/test/utils/Helper.js @@ -1,12 +1,12 @@ class Helper { // WAITING FUNCTION AS PER THE TIME GIVEN - async wait(ms) { - const start = Date.now(); - let now = start; + async wait (ms) { + const start = Date.now() + let now = start while (now - start < ms) { - now = Date.now(); + now = Date.now() } } } -export default new Helper(); +export default new Helper()