diff --git a/.gitignore b/.gitignore index a9054f07..bd59bb08 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ node_modules .secrets script/integration/*.json +yarn-error.log diff --git a/hardhat.config.js b/hardhat.config.js index dc5c602e..1c26c530 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -5,7 +5,7 @@ require("dotenv").config(); /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: { - version: "0.8.19", + version: "0.8.22", settings: { optimizer: { enabled: true, @@ -17,12 +17,18 @@ module.exports = { networks: { hardhat: { }, - exocore_testnet: { + exocore_localnet: { chainId: 9000, - url: "http://23.162.56.84:8545", + url: "http://127.0.0.1:8545", + chainId: 233, accounts: [ - // process.env.EXOCORE_DEPLOYER_PRIVATE_KEY, - // process.env.EXOCORE_VALIDATOR_SET_PRIVATE_KEY + process.env.LOCAL_EXOCORE_FUNDED_ACCOUNT_PRIVATE_KEY, + process.env.TEST_ACCOUNT_ONE_PRIVATE_KEY, + process.env.TEST_ACCOUNT_TWO_PRIVATE_KEY, + process.env.TEST_ACCOUNT_THREE_PRIVATE_KEY, + process.env.TEST_ACCOUNT_FOUR_PRIVATE_KEY, + process.env.TEST_ACCOUNT_FIVE_PRIVATE_KEY, + process.env.TEST_ACCOUNT_SIX_PRIVATE_KEY, ] } } diff --git a/package-lock.json b/package-lock.json index 967abee7..56ffbb86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,395 +9,47 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@lodestar/api": "^1.23.0", "@openzeppelin/upgrades-core": "^1.40.0", - "abbrev": "^1.0.9", - "abstract-level": "^1.0.3", - "acorn": "^8.11.2", - "acorn-walk": "^8.3.1", - "address": "^1.2.2", - "adm-zip": "^0.4.16", - "aes-js": "^4.0.0-beta.5", - "agent-base": "^6.0.2", - "aggregate-error": "^3.1.0", - "ajv": "^8.12.0", - "amdefine": "^1.0.1", - "ansi-colors": "^4.1.3", - "ansi-escapes": "^4.3.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^3.2.1", - "antlr4ts": "^0.5.0-alpha.4", - "anymatch": "^3.1.3", - "arg": "^4.1.3", - "argparse": "^2.0.1", - "array-back": "^3.1.0", - "array-union": "^2.1.0", - "array-uniq": "^1.0.3", - "asap": "^2.0.6", - "assertion-error": "^1.1.0", - "astral-regex": "^2.0.0", - "async": "^1.5.2", - "asynckit": "^0.4.0", - "at-least-node": "^1.0.0", - "axios": "^1.6.2", - "balanced-match": "^1.0.2", - "base-x": "^3.0.9", - "base64-js": "^1.5.1", - "bech32": "^1.1.4", - "bigint-crypto-utils": "^3.3.0", - "binary-extensions": "^2.2.0", - "blakejs": "^1.2.1", - "bn.js": "^5.2.1", - "brace-expansion": "^1.1.11", - "braces": "^3.0.2", - "brorand": "^1.1.0", - "browser-level": "^1.0.1", - "browser-stdout": "^1.3.1", - "browserify-aes": "^1.2.0", - "bs58": "^4.0.1", - "bs58check": "^2.1.2", - "buffer": "^6.0.3", - "buffer-from": "^1.1.2", - "buffer-xor": "^1.0.3", - "bytes": "^3.1.2", - "call-bind": "^1.0.5", - "camelcase": "^6.3.0", - "case": "^1.6.3", - "caseless": "^0.12.0", - "catering": "^2.1.1", - "cbor": "^8.1.0", - "chai": "^4.3.10", - "chai-as-promised": "^7.1.1", - "chalk": "^2.4.2", - "charenc": "^0.0.2", - "check-error": "^1.0.3", - "chokidar": "^3.5.3", - "ci-info": "^2.0.0", - "cipher-base": "^1.0.4", - "classic-level": "^1.3.0", - "clean-stack": "^2.2.0", - "cli-table3": "^0.5.1", - "cliui": "^7.0.4", - "color-convert": "^1.9.3", - "color-name": "^1.1.3", - "colors": "^1.4.0", - "combined-stream": "^1.0.8", - "command-exists": "^1.2.9", - "command-line-args": "^5.2.1", - "command-line-usage": "^6.1.3", - "commander": "^3.0.2", - "concat-map": "^0.0.1", - "concat-stream": "^1.6.2", - "cookie": "^0.4.2", - "core-util-is": "^1.0.3", - "crc-32": "^1.2.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "create-require": "^1.1.1", - "crypt": "^0.0.2", - "death": "^1.1.0", - "debug": "^4.3.4", - "decamelize": "^4.0.0", - "decimal.js": "10.4.3", - "deep-eql": "^4.1.3", - "deep-extend": "^0.6.0", - "deep-is": "^0.1.4", - "define-data-property": "^1.1.1", - "delayed-stream": "^1.0.0", - "depd": "^2.0.0", - "detect-port": "^1.5.1", - "diff": "^5.0.0", - "difflib": "^0.2.4", - "dir-glob": "^3.0.1", - "dotenv": "^16.3.1", - "elliptic": "^6.5.4", - "emoji-regex": "^8.0.0", - "enquirer": "^2.4.1", - "env-paths": "^2.2.1", - "escalade": "^3.1.1", - "escape-string-regexp": "^1.0.5", - "escodegen": "^1.8.1", - "esprima": "^2.7.3", - "estraverse": "^1.9.3", - "esutils": "^2.0.3", - "eth-gas-reporter": "^0.2.27", - "ethereum-bloom-filters": "^1.0.10", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^7.1.5", "ethers": "^6.9.0", - "ethjs-unit": "^0.1.6", - "ethjs-util": "^0.1.6", - "evp_bytestokey": "^1.0.3", - "fast-deep-equal": "^3.1.3", - "fast-glob": "^3.3.2", - "fast-levenshtein": "^2.0.6", - "fastq": "^1.15.0", - "fill-range": "^7.0.1", - "find-replace": "^3.0.0", - "find-up": "^2.1.0", - "flat": "^5.0.2", - "follow-redirects": "^1.15.3", - "form-data": "^4.0.0", - "fp-ts": "^1.19.3", - "fs-extra": "^9.1.0", - "fs-readdir-recursive": "^1.1.0", - "fs.realpath": "^1.0.0", - "function-bind": "^1.1.2", - "functional-red-black-tree": "^1.0.1", - "get-caller-file": "^2.0.5", - "get-func-name": "^2.0.2", - "get-intrinsic": "^1.2.2", - "get-port": "^3.2.0", - "ghost-testrpc": "^0.0.2", - "glob": "^7.2.0", - "glob-parent": "^5.1.2", - "global-modules": "^2.0.0", - "global-prefix": "^3.0.0", - "globby": "^10.0.2", - "gopd": "^1.0.1", - "graceful-fs": "^4.2.11", - "handlebars": "^4.7.8", - "hardhat-gas-reporter": "^1.0.9", - "has-flag": "^3.0.0", - "has-property-descriptors": "^1.0.1", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hash-base": "^3.1.0", - "hash.js": "^1.1.7", - "hasown": "^2.0.0", - "he": "^1.2.0", - "heap": "^0.2.7", - "hmac-drbg": "^1.0.1", - "http-basic": "^8.1.3", - "http-errors": "^2.0.0", - "http-response-object": "^3.0.2", - "https-proxy-agent": "^5.0.1", - "iconv-lite": "^0.4.24", - "ieee754": "^1.2.1", - "ignore": "^5.3.0", - "immutable": "^4.3.4", - "indent-string": "^4.0.0", - "inflight": "^1.0.6", - "inherits": "^2.0.4", - "ini": "^1.3.8", - "interpret": "^1.4.0", - "io-ts": "^1.10.4", - "is-binary-path": "^2.1.0", - "is-buffer": "^2.0.5", - "is-extglob": "^2.1.1", - "is-fullwidth-code-point": "^2.0.0", - "is-glob": "^4.0.3", - "is-hex-prefixed": "^1.0.0", - "is-number": "^7.0.0", - "is-plain-obj": "^2.1.0", - "is-unicode-supported": "^0.1.0", - "isarray": "^1.0.0", - "isexe": "^2.0.0", - "js-sdsl": "^4.4.2", - "js-sha3": "^0.8.0", - "js-yaml": "^4.1.0", - "json-bigint": "^1.0.0", - "json-schema-traverse": "^1.0.0", - "jsonfile": "^6.1.0", - "jsonschema": "^1.4.1", - "keccak": "^3.0.4", - "kind-of": "^6.0.3", - "klaw": "^1.3.1", - "level": "^8.0.0", - "level-supports": "^4.0.1", - "level-transcoder": "^1.0.1", - "levn": "^0.3.0", - "locate-path": "^2.0.0", - "lodash": "^4.17.21", - "lodash.camelcase": "^4.3.0", - "lodash.clonedeep": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.truncate": "^4.4.2", - "log-symbols": "^4.1.0", - "loupe": "^2.3.7", - "lru_map": "^0.3.3", - "lru-cache": "^5.1.1", - "make-error": "^1.3.6", - "markdown-table": "^1.1.3", - "mcl-wasm": "^0.7.9", - "md5.js": "^1.3.5", - "memory-level": "^1.0.0", - "memorystream": "^0.3.1", - "merge2": "^1.4.1", - "micro-ftch": "^0.3.1", - "micromatch": "^4.0.5", - "mime-db": "^1.52.0", - "mime-types": "^2.1.35", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1", - "minimatch": "^3.1.2", - "minimist": "^1.2.8", - "mkdirp": "^0.5.6", - "mnemonist": "^0.38.5", - "module-error": "^1.0.2", - "ms": "^2.1.2", - "nanoid": "^3.3.3", - "napi-macros": "^2.2.2", - "neo-async": "^2.6.2", - "node-addon-api": "^2.0.2", - "node-emoji": "^1.11.0", - "node-gyp-build": "^4.7.1", - "nofilter": "^3.1.0", - "nopt": "^3.0.6", - "normalize-path": "^3.0.0", - "number-to-bn": "^1.7.0", - "object-assign": "^4.1.1", - "object-inspect": "^1.13.1", - "obliterator": "^2.0.4", - "once": "^1.4.0", - "optionator": "^0.8.3", - "ordinal": "^1.0.3", - "os-tmpdir": "^1.0.2", - "p-limit": "^1.3.0", - "p-locate": "^2.0.0", - "p-map": "^4.0.0", - "p-try": "^1.0.0", - "parse-cache-control": "^1.0.1", - "path-exists": "^3.0.0", - "path-is-absolute": "^1.0.1", - "path-parse": "^1.0.7", - "path-type": "^4.0.0", - "pathval": "^1.1.1", - "pbkdf2": "^3.1.2", - "picomatch": "^2.3.1", - "pify": "^4.0.1", - "prelude-ls": "^1.1.2", - "prettier": "^2.8.8", - "process-nextick-args": "^2.0.1", - "promise": "^8.3.0", - "proxy-from-env": "^1.1.0", - "punycode": "^2.3.1", - "qs": "^6.11.2", - "queue-microtask": "^1.2.3", - "randombytes": "^2.1.0", - "raw-body": "^2.5.2", - "readable-stream": "^3.6.2", - "readdirp": "^3.6.0", - "rechoir": "^0.6.2", - "recursive-readdir": "^2.2.3", - "reduce-flatten": "^2.0.0", - "req-cwd": "^2.0.0", - "req-from": "^2.0.0", - "require-directory": "^2.1.1", - "require-from-string": "^2.0.2", - "resolve": "^1.17.0", - "resolve-from": "^3.0.0", - "reusify": "^1.0.4", - "rimraf": "^2.7.1", - "ripemd160": "^2.0.2", - "rlp": "^2.2.7", - "run-parallel": "^1.2.0", - "run-parallel-limit": "^1.1.0", - "rustbn.js": "^0.2.0", - "safe-buffer": "^5.2.1", - "safer-buffer": "^2.1.2", - "sc-istanbul": "^0.4.6", - "scrypt-js": "^3.0.1", - "secp256k1": "^4.0.3", - "semver": "^6.3.1", - "serialize-javascript": "^6.0.0", - "set-function-length": "^1.1.1", - "setimmediate": "^1.0.5", - "setprototypeof": "^1.2.0", - "sha.js": "^2.4.11", - "sha1": "^1.1.1", - "shelljs": "^0.8.5", - "side-channel": "^1.0.4", - "slash": "^3.0.0", - "slice-ansi": "^4.0.0", - "solc": "^0.7.3", - "solidity-coverage": "^0.8.5", - "source-map": "^0.2.0", - "source-map-support": "^0.5.21", - "sprintf-js": "^1.0.3", - "stacktrace-parser": "^0.1.10", - "statuses": "^2.0.1", - "string_decoder": "^1.3.0", - "string-format": "^2.0.0", - "string-width": "^2.1.1", - "strip-ansi": "^6.0.1", - "strip-hex-prefix": "^1.0.0", - "strip-json-comments": "^3.1.1", - "supports-color": "^5.5.0", - "sync-request": "^6.1.0", - "sync-rpc": "^1.3.6", - "table": "^6.8.1", - "table-layout": "^1.0.2", - "then-request": "^6.0.2", - "tmp": "^0.0.33", - "to-regex-range": "^5.0.1", - "toidentifier": "^1.0.1", - "ts-command-line-args": "^2.5.1", - "ts-essentials": "^7.0.3", - "ts-node": "^10.9.2", - "tslib": "^2.4.0", - "tsort": "^0.0.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1", - "type-check": "^0.3.2", - "type-detect": "^4.0.8", - "type-fest": "^0.21.3", - "typechain": "^8.3.2", - "typedarray": "^0.0.6", - "typescript": "^5.3.3", - "typical": "^4.0.0", - "uglify-js": "^3.17.4", - "undici": "^5.28.2", - "undici-types": "^5.26.5", - "universalify": "^2.0.1", - "unpipe": "^1.0.0", - "uri-js": "^4.4.1", - "utf8": "^3.0.0", - "util-deprecate": "^1.0.2", - "uuid": "^8.3.2", - "v8-compile-cache-lib": "^3.0.1", - "web3": "^4.6.0", - "web3-utils": "^1.10.3", - "which": "^1.3.1", - "word-wrap": "^1.2.5", - "wordwrap": "^1.0.0", - "wordwrapjs": "^4.0.1", - "workerpool": "^6.2.1", - "wrap-ansi": "^7.0.0", - "wrappy": "^1.0.2", - "ws": "^8.5.0", - "y18n": "^5.0.8", - "yallist": "^3.1.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.4", - "yargs-unparser": "^2.0.0", - "yn": "^3.1.1", - "yocto-queue": "^0.1.0" + "hardhat-gas-reporter": "^1.0.9" }, "devDependencies": { - "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "hardhat": "^2.19.3", + "@cosmjs/proto-signing": "^0.32.4", + "@cosmjs/stargate": "^0.32.2", + "@evmos/address-converter": "^0.1.9", + "@evmos/evmosjs": "github:evmos/evmosjs#main", + "@evmos/proto": "^0.2.1", + "@nomicfoundation/hardhat-foundry": "^1.1.3", + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "axios": "^1.7.9", + "bip39": "^3.1.0", + "bitcoinjs-lib": "^6.1.5", + "dotenv": "^16.4.7", + "ecpair": "^2.1.0", + "esm": "^3.2.25", + "ethereumjs-wallet": "^1.0.2", + "hardhat": "^2.22.17", "mocha": "^10.2.0", - "solhint": "^5.0.1" + "solhint": "^5.0.1", + "tiny-secp256k1": "^2.2.3" }, "optionalDependencies": { "fsevents": "^2.3.3" } }, "node_modules/@adraffy/ens-normalize": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz", - "integrity": "sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==" + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -405,205 +57,482 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "node_modules/@buf/cosmos_cosmos-proto.bufbuild_es": { + "version": "1.0.0-20211202220400-1935555c206d.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_cosmos-proto.bufbuild_es/-/cosmos_cosmos-proto.bufbuild_es-1.0.0-20211202220400-1935555c206d.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" + } + }, + "node_modules/@buf/cosmos_cosmos-sdk.bufbuild_es": { + "version": "1.0.0-20240220165237-05419252bcc2.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_cosmos-sdk.bufbuild_es/-/cosmos_cosmos-sdk.bufbuild_es-1.0.0-20240220165237-05419252bcc2.1.tgz", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@buf/cosmos_cosmos-proto.bufbuild_es": "1.0.0-20211202220400-1935555c206d.1", + "@buf/cosmos_gogo-proto.bufbuild_es": "1.0.0-20240130113600-88ef6483f90f.1", + "@buf/googleapis_googleapis.bufbuild_es": "1.0.0-20240207202044-7e6f6e774e29.1", + "@buf/protocolbuffers_wellknowntypes.bufbuild_es": "1.0.0-20230509212704-657250e6a396.1", + "@buf/tendermint_tendermint.bufbuild_es": "1.0.0-20231117195010-33ed361a9051.1" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@chainsafe/as-sha256": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", - "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==" + "node_modules/@buf/cosmos_gogo-proto.bufbuild_es": { + "version": "1.0.0-20240130113600-88ef6483f90f.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_gogo-proto.bufbuild_es/-/cosmos_gogo-proto.bufbuild_es-1.0.0-20240130113600-88ef6483f90f.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" + } }, - "node_modules/@chainsafe/hashtree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@chainsafe/hashtree/-/hashtree-1.0.1.tgz", - "integrity": "sha512-bleu9FjqBeR/l6W1u2Lz+HsS0b0LLJX2eUt3hOPBN7VqOhidx8wzkVh2S7YurS+iTQtfdK4K5QU9tcTGNrGwDg==", - "engines": { - "node": ">= 18" + "node_modules/@buf/cosmos_ibc.bufbuild_es": { + "version": "1.0.0-20241210102225-a7af51c19a5c.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_ibc.bufbuild_es/-/cosmos_ibc.bufbuild_es-1.0.0-20241210102225-a7af51c19a5c.1.tgz", + "dev": true, + "dependencies": { + "@buf/cosmos_cosmos-proto.bufbuild_es": "1.0.0-20211202220400-1935555c206d.1", + "@buf/cosmos_cosmos-sdk.bufbuild_es": "1.0.0-20230719110346-aa25660f4ff7.1", + "@buf/cosmos_gogo-proto.bufbuild_es": "1.0.0-20221020125208-34d970b699f8.1", + "@buf/cosmos_ics23.bufbuild_es": "1.0.0-20221207100654-55085f7c710a.1", + "@buf/googleapis_googleapis.bufbuild_es": "1.0.0-20220908150232-8d7204855ec1.1" }, - "optionalDependencies": { - "@chainsafe/hashtree-darwin-arm64": "1.0.1", - "@chainsafe/hashtree-linux-arm64-gnu": "1.0.1", - "@chainsafe/hashtree-linux-x64-gnu": "1.0.1" + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@chainsafe/hashtree-darwin-arm64": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@chainsafe/hashtree-darwin-arm64/-/hashtree-darwin-arm64-1.0.1.tgz", - "integrity": "sha512-+KmEgQMpO7FDL3klAcpXbQ4DPZvfCe0qSaBBrtT4vLF8V1JGm3sp+j7oibtxtOsLKz7nJMiK1pZExi7vjXu8og==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" + "node_modules/@buf/cosmos_ibc.bufbuild_es/node_modules/@buf/cosmos_cosmos-sdk.bufbuild_es": { + "version": "1.0.0-20230719110346-aa25660f4ff7.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_cosmos-sdk.bufbuild_es/-/cosmos_cosmos-sdk.bufbuild_es-1.0.0-20230719110346-aa25660f4ff7.1.tgz", + "dev": true, + "dependencies": { + "@buf/cosmos_cosmos-proto.bufbuild_es": "1.0.0-20211202220400-1935555c206d.1", + "@buf/cosmos_gogo-proto.bufbuild_es": "1.0.0-20230509103710-5e5b9fdd0180.1", + "@buf/googleapis_googleapis.bufbuild_es": "1.0.0-20230502210827-cc916c318597.1" + }, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@chainsafe/hashtree-linux-arm64-gnu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@chainsafe/hashtree-linux-arm64-gnu/-/hashtree-linux-arm64-gnu-1.0.1.tgz", - "integrity": "sha512-p1hnhGq2aFY+Zhdn1Q6L/6yLYNKjqXfn/Pc8jiM0e3+Lf/hB+yCdqYVu1pto26BrZjugCFZfupHaL4DjUTDttw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "node_modules/@buf/cosmos_ibc.bufbuild_es/node_modules/@buf/cosmos_cosmos-sdk.bufbuild_es/node_modules/@buf/cosmos_gogo-proto.bufbuild_es": { + "version": "1.0.0-20230509103710-5e5b9fdd0180.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_gogo-proto.bufbuild_es/-/cosmos_gogo-proto.bufbuild_es-1.0.0-20230509103710-5e5b9fdd0180.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@chainsafe/hashtree-linux-x64-gnu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@chainsafe/hashtree-linux-x64-gnu/-/hashtree-linux-x64-gnu-1.0.1.tgz", - "integrity": "sha512-uCIGuUWuWV0LiB4KLMy6JFa7Jp6NmPl3hKF5BYWu8TzUBe7vSXMZfqTzGxXPggFYN2/0KymfRdG9iDCOJfGRqg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "node_modules/@buf/cosmos_ibc.bufbuild_es/node_modules/@buf/cosmos_cosmos-sdk.bufbuild_es/node_modules/@buf/googleapis_googleapis.bufbuild_es": { + "version": "1.0.0-20230502210827-cc916c318597.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/googleapis_googleapis.bufbuild_es/-/googleapis_googleapis.bufbuild_es-1.0.0-20230502210827-cc916c318597.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", - "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1" + "node_modules/@buf/cosmos_ibc.bufbuild_es/node_modules/@buf/cosmos_gogo-proto.bufbuild_es": { + "version": "1.0.0-20221020125208-34d970b699f8.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_gogo-proto.bufbuild_es/-/cosmos_gogo-proto.bufbuild_es-1.0.0-20221020125208-34d970b699f8.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@chainsafe/ssz": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", - "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.4.2", - "case": "^1.6.3" + "node_modules/@buf/cosmos_ibc.bufbuild_es/node_modules/@buf/googleapis_googleapis.bufbuild_es": { + "version": "1.0.0-20220908150232-8d7204855ec1.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/googleapis_googleapis.bufbuild_es/-/googleapis_googleapis.bufbuild_es-1.0.0-20220908150232-8d7204855ec1.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@buf/cosmos_ics23.bufbuild_es": { + "version": "1.0.0-20221207100654-55085f7c710a.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_ics23.bufbuild_es/-/cosmos_ics23.bufbuild_es-1.0.0-20221207100654-55085f7c710a.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" + } + }, + "node_modules/@buf/evmos_evmos.bufbuild_es": { + "version": "1.2.0-20241008121741-fda6f6b3cb58.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/evmos_evmos.bufbuild_es/-/evmos_evmos.bufbuild_es-1.2.0-20241008121741-fda6f6b3cb58.1.tgz", + "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" + "@buf/cosmos_cosmos-proto.bufbuild_es": "1.2.0-20211202220400-1935555c206d.1", + "@buf/cosmos_cosmos-sdk.bufbuild_es": "1.2.0-20221115045553-508e19f5f375.1", + "@buf/cosmos_gogo-proto.bufbuild_es": "1.2.0-20221020125208-34d970b699f8.1", + "@buf/googleapis_googleapis.bufbuild_es": "1.2.0-20221025150512-783e4b5374fa.1" }, - "engines": { - "node": ">=12" + "peerDependencies": { + "@bufbuild/protobuf": "^1.2.0" } }, - "node_modules/@ethereumjs/rlp": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", - "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", - "bin": { - "rlp": "bin/rlp" - }, - "engines": { - "node": ">=14" + "node_modules/@buf/evmos_evmos.bufbuild_es/node_modules/@buf/cosmos_cosmos-proto.bufbuild_es": { + "version": "1.2.0-20211202220400-1935555c206d.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_cosmos-proto.bufbuild_es/-/cosmos_cosmos-proto.bufbuild_es-1.2.0-20211202220400-1935555c206d.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.2.0" } }, - "node_modules/@ethereumjs/util": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", - "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "node_modules/@buf/evmos_evmos.bufbuild_es/node_modules/@buf/cosmos_cosmos-sdk.bufbuild_es": { + "version": "1.2.0-20221115045553-508e19f5f375.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_cosmos-sdk.bufbuild_es/-/cosmos_cosmos-sdk.bufbuild_es-1.2.0-20221115045553-508e19f5f375.1.tgz", + "dev": true, "dependencies": { - "@ethereumjs/rlp": "^4.0.1", - "ethereum-cryptography": "^2.0.0", - "micro-ftch": "^0.3.1" + "@buf/cosmos_cosmos-proto.bufbuild_es": "1.2.0-20211202220400-1935555c206d.1", + "@buf/cosmos_gogo-proto.bufbuild_es": "1.2.0-20221020125208-34d970b699f8.1", + "@buf/googleapis_googleapis.bufbuild_es": "1.2.0-20221025150512-783e4b5374fa.1" }, - "engines": { - "node": ">=14" + "peerDependencies": { + "@bufbuild/protobuf": "^1.2.0" } }, - "node_modules/@ethereumjs/util/node_modules/@noble/curves": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", - "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "node_modules/@buf/evmos_evmos.bufbuild_es/node_modules/@buf/cosmos_gogo-proto.bufbuild_es": { + "version": "1.2.0-20221020125208-34d970b699f8.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_gogo-proto.bufbuild_es/-/cosmos_gogo-proto.bufbuild_es-1.2.0-20221020125208-34d970b699f8.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.2.0" + } + }, + "node_modules/@buf/evmos_evmos.bufbuild_es/node_modules/@buf/googleapis_googleapis.bufbuild_es": { + "version": "1.2.0-20221025150512-783e4b5374fa.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/googleapis_googleapis.bufbuild_es/-/googleapis_googleapis.bufbuild_es-1.2.0-20221025150512-783e4b5374fa.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.2.0" + } + }, + "node_modules/@buf/googleapis_googleapis.bufbuild_es": { + "version": "1.0.0-20240207202044-7e6f6e774e29.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/googleapis_googleapis.bufbuild_es/-/googleapis_googleapis.bufbuild_es-1.0.0-20240207202044-7e6f6e774e29.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" + } + }, + "node_modules/@buf/protocolbuffers_wellknowntypes.bufbuild_es": { + "version": "1.0.0-20230509212704-657250e6a396.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/protocolbuffers_wellknowntypes.bufbuild_es/-/protocolbuffers_wellknowntypes.bufbuild_es-1.0.0-20230509212704-657250e6a396.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" + } + }, + "node_modules/@buf/tendermint_tendermint.bufbuild_es": { + "version": "1.0.0-20231117195010-33ed361a9051.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/tendermint_tendermint.bufbuild_es/-/tendermint_tendermint.bufbuild_es-1.0.0-20231117195010-33ed361a9051.1.tgz", + "dev": true, "dependencies": { - "@noble/hashes": "1.3.1" + "@buf/cosmos_gogo-proto.bufbuild_es": "1.0.0-20230509103710-5e5b9fdd0180.1" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node_modules/@buf/tendermint_tendermint.bufbuild_es/node_modules/@buf/cosmos_gogo-proto.bufbuild_es": { + "version": "1.0.0-20230509103710-5e5b9fdd0180.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/cosmos_gogo-proto.bufbuild_es/-/cosmos_gogo-proto.bufbuild_es-1.0.0-20230509103710-5e5b9fdd0180.1.tgz", + "dev": true, + "peerDependencies": { + "@bufbuild/protobuf": "^1.0.0" } }, - "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", - "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "node_modules/@bufbuild/protobuf": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", + "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==", + "dev": true + }, + "node_modules/@bytecodealliance/preview2-shim": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.17.0.tgz", + "integrity": "sha512-JorcEwe4ud0x5BS/Ar2aQWOQoFzjq/7jcnxYXCvSMh0oRm0dQXzOA+hqLDBnOMks1LLBA7dmiLLsEBl09Yd6iQ==" + }, + "node_modules/@confio/ics23": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", + "integrity": "sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==", + "dev": true, "dependencies": { - "@noble/curves": "1.1.0", - "@noble/hashes": "1.3.1", - "@scure/bip32": "1.3.1", - "@scure/bip39": "1.2.1" + "@noble/hashes": "^1.0.0", + "protobufjs": "^6.8.8" } }, - "node_modules/@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/@cosmjs/amino": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.32.4.tgz", + "integrity": "sha512-zKYOt6hPy8obIFtLie/xtygCkH9ZROiQ12UHfKsOkWaZfPQUvVbtgmu6R4Kn1tFLI/SRkw7eqhaogmW/3NYu/Q==", + "dev": true, "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@cosmjs/crypto": "^0.32.4", + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/math": "^0.32.4", + "@cosmjs/utils": "^0.32.4" } }, - "node_modules/@ethersproject/abstract-provider": { + "node_modules/@cosmjs/crypto": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.32.4.tgz", + "integrity": "sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw==", + "dev": true, + "dependencies": { + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/math": "^0.32.4", + "@cosmjs/utils": "^0.32.4", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers-sumo": "^0.7.11" + } + }, + "node_modules/@cosmjs/encoding": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.4.tgz", + "integrity": "sha512-tjvaEy6ZGxJchiizzTn7HVRiyTg1i4CObRRaTRPknm5EalE13SV+TCHq38gIDfyUeden4fCuaBVEdBR5+ti7Hw==", + "dev": true, + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "node_modules/@cosmjs/json-rpc": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.32.4.tgz", + "integrity": "sha512-/jt4mBl7nYzfJ2J/VJ+r19c92mUKF0Lt0JxM3MXEJl7wlwW5haHAWtzRujHkyYMXOwIR+gBqT2S0vntXVBRyhQ==", + "dev": true, + "dependencies": { + "@cosmjs/stream": "^0.32.4", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/math": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.4.tgz", + "integrity": "sha512-++dqq2TJkoB8zsPVYCvrt88oJWsy1vMOuSOKcdlnXuOA/ASheTJuYy4+oZlTQ3Fr8eALDLGGPhJI02W2HyAQaw==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmjs/proto-signing": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.32.4.tgz", + "integrity": "sha512-QdyQDbezvdRI4xxSlyM1rSVBO2st5sqtbEIl3IX03uJ7YiZIQHyv6vaHVf1V4mapusCqguiHJzm4N4gsFdLBbQ==", + "dev": true, + "dependencies": { + "@cosmjs/amino": "^0.32.4", + "@cosmjs/crypto": "^0.32.4", + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/math": "^0.32.4", + "@cosmjs/utils": "^0.32.4", + "cosmjs-types": "^0.9.0" + } + }, + "node_modules/@cosmjs/socket": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.32.4.tgz", + "integrity": "sha512-davcyYziBhkzfXQTu1l5NrpDYv0K9GekZCC9apBRvL1dvMc9F/ygM7iemHjUA+z8tJkxKxrt/YPjJ6XNHzLrkw==", + "dev": true, + "dependencies": { + "@cosmjs/stream": "^0.32.4", + "isomorphic-ws": "^4.0.1", + "ws": "^7", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/socket/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@cosmjs/stargate": { + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.32.2.tgz", + "integrity": "sha512-AsJa29fT7Jd4xt9Ai+HMqhyj7UQu7fyYKdXj/8+/9PD74xe6lZSYhQPcitUmMLJ1ckKPgXSk5Dd2LbsQT0IhZg==", + "dev": true, + "dependencies": { + "@confio/ics23": "^0.6.8", + "@cosmjs/amino": "^0.32.2", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/proto-signing": "^0.32.2", + "@cosmjs/stream": "^0.32.2", + "@cosmjs/tendermint-rpc": "^0.32.2", + "@cosmjs/utils": "^0.32.2", + "cosmjs-types": "^0.9.0", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/stream": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.32.4.tgz", + "integrity": "sha512-Gih++NYHEiP+oyD4jNEUxU9antoC0pFSg+33Hpp0JlHwH0wXhtD3OOKnzSfDB7OIoEbrzLJUpEjOgpCp5Z+W3A==", + "dev": true, + "dependencies": { + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/tendermint-rpc": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.32.4.tgz", + "integrity": "sha512-MWvUUno+4bCb/LmlMIErLypXxy7ckUuzEmpufYYYd9wgbdCXaTaO08SZzyFM5PI8UJ/0S2AmUrgWhldlbxO8mw==", + "dev": true, + "dependencies": { + "@cosmjs/crypto": "^0.32.4", + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/json-rpc": "^0.32.4", + "@cosmjs/math": "^0.32.4", + "@cosmjs/socket": "^0.32.4", + "@cosmjs/stream": "^0.32.4", + "@cosmjs/utils": "^0.32.4", + "axios": "^1.6.0", + "readonly-date": "^1.0.0", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/utils": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.32.4.tgz", + "integrity": "sha512-D1Yc+Zy8oL/hkUkFUL/bwxvuDBzRGpc4cF7/SkdhxX4iHpSLgdOuTt1mhCh9+kl6NQREy9t7SYZ6xeW5gFe60w==", + "dev": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "devOptional": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "dev": true, + "peer": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dev": true, + "peer": true, + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", @@ -1273,6 +1202,58 @@ "@ethersproject/strings": "^5.7.0" } }, + "node_modules/@evmos/address-converter": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@evmos/address-converter/-/address-converter-0.1.9.tgz", + "integrity": "sha512-Sbl4hHo/4UkMgmdwBDN/GNMhDeOlc5CyRCLFMajTVKyT0Sf269RQsuntD+P48EJWIpBjw3q6+laVZ9hrpfB4Nw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "bech32": "^2.0.0", + "crypto-addr-codec": "^0.1.7", + "link-module-alias": "^1.2.0", + "shx": "^0.3.4" + } + }, + "node_modules/@evmos/address-converter/node_modules/bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", + "dev": true + }, + "node_modules/@evmos/evmosjs": { + "version": "0.1.0", + "resolved": "git+ssh://git@github.com/evmos/evmosjs.git#e47e44b1683ffa57737cee2f6abbd138436d9fc3", + "dev": true, + "workspaces": { + "packages": [ + "packages/*" + ] + } + }, + "node_modules/@evmos/proto": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@evmos/proto/-/proto-0.2.1.tgz", + "integrity": "sha512-FvloeY4LqLn7p9s7MY32lhpTiiNItlBySxLANUgpx/08rWR8wXo3CBYay/oFbbDVwgaxhQyjsVx2M3vGoEfLow==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@buf/cosmos_cosmos-sdk.bufbuild_es": "^1.0.0-20230125164018-54d184078b88.1", + "@buf/cosmos_ibc.bufbuild_es": "^1.0.0-20230127093016-72d4bdec25a0.1", + "@buf/evmos_evmos.bufbuild_es": "^1.2.0-20230315212311-c66c6f141d04.1", + "@bufbuild/protobuf": "^1.0.0", + "@types/node": "^17.0.21", + "link-module-alias": "^1.2.0", + "sha3": "^2.1.4", + "shx": "^0.3.4" + } + }, + "node_modules/@evmos/proto/node_modules/@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + }, "node_modules/@fastify/busboy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", @@ -1285,6 +1266,8 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "devOptional": true, + "peer": true, "engines": { "node": ">=6.0.0" } @@ -1292,253 +1275,69 @@ "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==" + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "devOptional": true, + "peer": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "devOptional": true, + "peer": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@lodestar/api": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@lodestar/api/-/api-1.23.0.tgz", - "integrity": "sha512-ackvkEvA2EPyvtZaniMZvM/IBrpwy+BcA7EQGTxMgzILngkkoL9WZukGb0Mq2rVe6ccU+Q0YXfG/dlByW/tW4Q==", - "dependencies": { - "@chainsafe/persistent-merkle-tree": "^0.8.0", - "@chainsafe/ssz": "^0.18.0", - "@lodestar/config": "^1.23.0", - "@lodestar/params": "^1.23.0", - "@lodestar/types": "^1.23.0", - "@lodestar/utils": "^1.23.0", - "eventsource": "^2.0.2", - "qs": "^6.11.1" - } - }, - "node_modules/@lodestar/api/node_modules/@chainsafe/as-sha256": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.5.0.tgz", - "integrity": "sha512-dTIY6oUZNdC5yDTVP5Qc9hAlKAsn0QTQ2DnQvvsbTnKSTbYs3p5RPN0aIUqN0liXei/9h24c7V0dkV44cnWIQA==" - }, - "node_modules/@lodestar/api/node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.8.0.tgz", - "integrity": "sha512-hh6C1JO6SKlr0QGNTNtTLqgGVMA/Bc20wD6CeMHp+wqbFKCULRJuBUxhF4WDx/7mX8QlqF3nFriF/Eo8oYJ4/A==", - "dependencies": { - "@chainsafe/as-sha256": "0.5.0", - "@chainsafe/hashtree": "1.0.1", - "@noble/hashes": "^1.3.0" - } - }, - "node_modules/@lodestar/api/node_modules/@chainsafe/ssz": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.18.0.tgz", - "integrity": "sha512-1ikTjk3JK6+fsGWiT5IvQU0AP6gF3fDzGmPfkKthbcbgTUR8fjB83Ywp9ko/ZoiDGfrSFkATgT4hvRzclu0IAA==", - "dependencies": { - "@chainsafe/as-sha256": "0.5.0", - "@chainsafe/persistent-merkle-tree": "0.8.0" - } - }, - "node_modules/@lodestar/config": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@lodestar/config/-/config-1.23.0.tgz", - "integrity": "sha512-K4MlD/LjW1IvQQL1I3QTYx1HOUITgKRmyazv9Xm7NlIk073esQW7iK0wVO8nJfW5gglTK0amQnC9SFgcGOqqYg==", - "dependencies": { - "@chainsafe/ssz": "^0.18.0", - "@lodestar/params": "^1.23.0", - "@lodestar/types": "^1.23.0", - "@lodestar/utils": "^1.23.0" - } - }, - "node_modules/@lodestar/config/node_modules/@chainsafe/as-sha256": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.5.0.tgz", - "integrity": "sha512-dTIY6oUZNdC5yDTVP5Qc9hAlKAsn0QTQ2DnQvvsbTnKSTbYs3p5RPN0aIUqN0liXei/9h24c7V0dkV44cnWIQA==" - }, - "node_modules/@lodestar/config/node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.8.0.tgz", - "integrity": "sha512-hh6C1JO6SKlr0QGNTNtTLqgGVMA/Bc20wD6CeMHp+wqbFKCULRJuBUxhF4WDx/7mX8QlqF3nFriF/Eo8oYJ4/A==", - "dependencies": { - "@chainsafe/as-sha256": "0.5.0", - "@chainsafe/hashtree": "1.0.1", - "@noble/hashes": "^1.3.0" - } - }, - "node_modules/@lodestar/config/node_modules/@chainsafe/ssz": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.18.0.tgz", - "integrity": "sha512-1ikTjk3JK6+fsGWiT5IvQU0AP6gF3fDzGmPfkKthbcbgTUR8fjB83Ywp9ko/ZoiDGfrSFkATgT4hvRzclu0IAA==", + "node_modules/@metamask/eth-sig-util": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", + "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", "dependencies": { - "@chainsafe/as-sha256": "0.5.0", - "@chainsafe/persistent-merkle-tree": "0.8.0" + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^6.2.1", + "ethjs-util": "^0.1.6", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1" + }, + "engines": { + "node": ">=12.0.0" } }, - "node_modules/@lodestar/params": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@lodestar/params/-/params-1.23.0.tgz", - "integrity": "sha512-NphFvYezC6RQg8xKUFQmEMm2YfntuirNSKo+EId1/LntXtzcZM1QTRNyuW9GJqA7mnMi+ZKs7NvE0kqU9Yocdg==" - }, - "node_modules/@lodestar/types": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@lodestar/types/-/types-1.23.0.tgz", - "integrity": "sha512-7bzS4ZaW5n+rKdErycxnP+oxzM+JaEolTaIjoUMWbuS6jADZsgh74kbJVgS2yNO6HV6a9o0igp11jUg1UcnSLw==", + "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dependencies": { - "@chainsafe/ssz": "^0.18.0", - "@lodestar/params": "^1.23.0", - "ethereum-cryptography": "^2.0.0" + "@types/node": "*" } }, - "node_modules/@lodestar/types/node_modules/@chainsafe/as-sha256": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.5.0.tgz", - "integrity": "sha512-dTIY6oUZNdC5yDTVP5Qc9hAlKAsn0QTQ2DnQvvsbTnKSTbYs3p5RPN0aIUqN0liXei/9h24c7V0dkV44cnWIQA==" - }, - "node_modules/@lodestar/types/node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.8.0.tgz", - "integrity": "sha512-hh6C1JO6SKlr0QGNTNtTLqgGVMA/Bc20wD6CeMHp+wqbFKCULRJuBUxhF4WDx/7mX8QlqF3nFriF/Eo8oYJ4/A==", - "dependencies": { - "@chainsafe/as-sha256": "0.5.0", - "@chainsafe/hashtree": "1.0.1", - "@noble/hashes": "^1.3.0" - } + "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, - "node_modules/@lodestar/types/node_modules/@chainsafe/ssz": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.18.0.tgz", - "integrity": "sha512-1ikTjk3JK6+fsGWiT5IvQU0AP6gF3fDzGmPfkKthbcbgTUR8fjB83Ywp9ko/ZoiDGfrSFkATgT4hvRzclu0IAA==", + "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dependencies": { - "@chainsafe/as-sha256": "0.5.0", - "@chainsafe/persistent-merkle-tree": "0.8.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } }, - "node_modules/@lodestar/types/node_modules/@noble/curves": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", - "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@lodestar/types/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@lodestar/types/node_modules/@scure/bip32": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", - "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", - "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@lodestar/types/node_modules/@scure/bip39": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", - "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", - "dependencies": { - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@lodestar/types/node_modules/ethereum-cryptography": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", - "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", - "dependencies": { - "@noble/curves": "1.4.2", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", - "@scure/bip39": "1.3.0" - } - }, - "node_modules/@lodestar/utils": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@lodestar/utils/-/utils-1.23.0.tgz", - "integrity": "sha512-J0+0Mo2ufWrdg8nj9ciujOGrIJK+6sczYpSpNgyxupq+2i/XGNpjxXLqXznpW5KPOeWEPkRgR99lp/UYbTnFWA==", - "dependencies": { - "@chainsafe/as-sha256": "^0.5.0", - "any-signal": "3.0.1", - "bigint-buffer": "^1.1.5", - "case": "^1.6.3", - "js-yaml": "^4.1.0" - } - }, - "node_modules/@lodestar/utils/node_modules/@chainsafe/as-sha256": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.5.0.tgz", - "integrity": "sha512-dTIY6oUZNdC5yDTVP5Qc9hAlKAsn0QTQ2DnQvvsbTnKSTbYs3p5RPN0aIUqN0liXei/9h24c7V0dkV44cnWIQA==" - }, - "node_modules/@metamask/eth-sig-util": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", - "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", - "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^6.2.1", - "ethjs-util": "^0.1.6", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, - "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, - "node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", - "dependencies": { - "@noble/hashes": "1.3.2" + "@noble/hashes": "1.3.2" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -1570,6 +1369,8 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1582,6 +1383,8 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, "engines": { "node": ">= 8" } @@ -1590,6 +1393,8 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1598,297 +1403,146 @@ "node": ">= 8" } }, - "node_modules/@nomicfoundation/ethereumjs-block": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz", - "integrity": "sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==", + "node_modules/@nomicfoundation/edr": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.6.5.tgz", + "integrity": "sha512-tAqMslLP+/2b2sZP4qe9AuGxG3OkQ5gGgHE4isUuq6dUVjwCRPFhAOhpdFl+OjY5P3yEv3hmq9HjUGRa2VNjng==", "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1" + "@nomicfoundation/edr-darwin-arm64": "0.6.5", + "@nomicfoundation/edr-darwin-x64": "0.6.5", + "@nomicfoundation/edr-linux-arm64-gnu": "0.6.5", + "@nomicfoundation/edr-linux-arm64-musl": "0.6.5", + "@nomicfoundation/edr-linux-x64-gnu": "0.6.5", + "@nomicfoundation/edr-linux-x64-musl": "0.6.5", + "@nomicfoundation/edr-win32-x64-msvc": "0.6.5" }, "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-block/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "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.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@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.1", - "@ethersproject/wordlists": "5.7.0" + "node_modules/@nomicfoundation/edr-darwin-arm64": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.6.5.tgz", + "integrity": "sha512-A9zCCbbNxBpLgjS1kEJSpqxIvGGAX4cYbpDYCU2f3jVqOwaZ/NU761y1SvuCRVpOwhoCXqByN9b7HPpHi0L4hw==", + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz", - "integrity": "sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==", - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-ethash": "3.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "level": "^8.0.0", - "lru-cache": "^5.1.1", - "memory-level": "^1.0.0" - }, + "node_modules/@nomicfoundation/edr-darwin-x64": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.6.5.tgz", + "integrity": "sha512-x3zBY/v3R0modR5CzlL6qMfFMdgwd6oHrWpTkuuXnPFOX8SU31qq87/230f4szM+ukGK8Hi+mNq7Ro2VF4Fj+w==", "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-common": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz", - "integrity": "sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==", - "dependencies": { - "@nomicfoundation/ethereumjs-util": "9.0.2", - "crc-32": "^1.2.0" + "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.6.5.tgz", + "integrity": "sha512-HGpB8f1h8ogqPHTyUpyPRKZxUk2lu061g97dOQ/W4CxevI0s/qiw5DB3U3smLvSnBHKOzYS1jkxlMeGN01ky7A==", + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz", - "integrity": "sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==", - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "bigint-crypto-utils": "^3.0.23", - "ethereum-cryptography": "0.1.3" - }, + "node_modules/@nomicfoundation/edr-linux-arm64-musl": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.6.5.tgz", + "integrity": "sha512-ESvJM5Y9XC03fZg9KaQg3Hl+mbx7dsSkTIAndoJS7X2SyakpL9KZpOSYrDk135o8s9P9lYJdPOyiq+Sh+XoCbQ==", "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-evm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz", - "integrity": "sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==", - "dependencies": { - "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" - }, + "node_modules/@nomicfoundation/edr-linux-x64-gnu": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.6.5.tgz", + "integrity": "sha512-HCM1usyAR1Ew6RYf5AkMYGvHBy64cPA5NMbaeY72r0mpKaH3txiMyydcHibByOGdQ8iFLWpyUdpl1egotw+Tgg==", "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz", - "integrity": "sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==", - "bin": { - "rlp": "bin/rlp" - }, + "node_modules/@nomicfoundation/edr-linux-x64-musl": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.6.5.tgz", + "integrity": "sha512-nB2uFRyczhAvWUH7NjCsIO6rHnQrof3xcCe6Mpmnzfl2PYcGyxN7iO4ZMmRcQS7R1Y670VH6+8ZBiRn8k43m7A==", "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz", - "integrity": "sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==", - "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1", - "js-sdsl": "^4.1.4" + "node_modules/@nomicfoundation/edr-win32-x64-msvc": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.6.5.tgz", + "integrity": "sha512-B9QD/4DSSCFtWicO8A3BrsnitO1FPv7axB62wq5Q+qeJ50yJlTmyeGY3cw62gWItdvy2mh3fRM6L1LpnHiB77A==", + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-statemanager/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "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/@nomicfoundation/ethereumjs-common": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", + "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", "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.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@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.1", - "@ethersproject/wordlists": "5.7.0" + "@nomicfoundation/ethereumjs-util": "9.0.4" } }, - "node_modules/@nomicfoundation/ethereumjs-trie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz", - "integrity": "sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==", - "dependencies": { - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@types/readable-stream": "^2.3.13", - "ethereum-cryptography": "0.1.3", - "readable-stream": "^3.6.0" + "node_modules/@nomicfoundation/ethereumjs-rlp": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", + "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", + "bin": { + "rlp": "bin/rlp.cjs" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-tx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz", - "integrity": "sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==", - "dependencies": { - "@chainsafe/ssz": "^0.9.2", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", + "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", + "dependencies": { + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } } }, "node_modules/@nomicfoundation/ethereumjs-util": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz", - "integrity": "sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", + "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", "dependencies": { - "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" - } - }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", - "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1" + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } } }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/ssz": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", - "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.5.0" - } - }, - "node_modules/@nomicfoundation/ethereumjs-vm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz", - "integrity": "sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==", - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.2.tgz", - "integrity": "sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw==", - "dev": true, - "peer": true, + "node_modules/@nomicfoundation/hardhat-chai-matchers": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.8.tgz", + "integrity": "sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg==", + "dev": true, + "peer": true, "dependencies": { "@types/chai-as-promised": "^7.1.3", "chai-as-promised": "^7.1.1", @@ -1903,9 +1557,9 @@ } }, "node_modules/@nomicfoundation/hardhat-ethers": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz", - "integrity": "sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz", + "integrity": "sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA==", "dev": true, "peer": true, "dependencies": { @@ -1918,21 +1572,55 @@ } }, "node_modules/@nomicfoundation/hardhat-foundry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.1.tgz", - "integrity": "sha512-cXGCBHAiXas9Pg9MhMOpBVQCkWRYoRFG7GJJAph+sdQsfd22iRs5U5Vs9XmpGEQd1yEvYISQZMeE68Nxj65iUQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.3.tgz", + "integrity": "sha512-30Ezc3hlZ4pC5Z/9W9euW5uoPKKQQKaecLETHJH8BPpd30zYOooy6HfjmcTY1/taOQjlwirOdNO7tHlje8Qcgw==", "dev": true, "dependencies": { - "chalk": "^2.4.2" + "picocolors": "^1.1.0" }, "peerDependencies": { "hardhat": "^2.17.2" } }, + "node_modules/@nomicfoundation/hardhat-ignition": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.8.tgz", + "integrity": "sha512-TN8TFQokcd7VyqGfbXO+KS8Q4K/gmsOFlv8dPnt/N596AncgV2Igxh5C3O+KVez11PDHNqoj1JzcDzzNVHrIRw==", + "dev": true, + "peer": true, + "dependencies": { + "@nomicfoundation/ignition-core": "^0.15.8", + "@nomicfoundation/ignition-ui": "^0.15.8", + "chalk": "^4.0.0", + "debug": "^4.3.2", + "fs-extra": "^10.0.0", + "json5": "^2.2.3", + "prompts": "^2.4.2" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-verify": "^2.0.1", + "hardhat": "^2.18.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ignition-ethers": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.8.tgz", + "integrity": "sha512-5Ev8cXBKgqqOsFXxWe8iijsRabWGd/Vclx3SC903KeKVePdssVsZcYTtRNRcIwRcPJ0RIKJPIZz7MNDo64l3+w==", + "dev": true, + "peer": true, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.0.4", + "@nomicfoundation/hardhat-ignition": "^0.15.8", + "@nomicfoundation/ignition-core": "^0.15.8", + "ethers": "^6.7.0", + "hardhat": "^2.18.0" + } + }, "node_modules/@nomicfoundation/hardhat-network-helpers": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.10.tgz", - "integrity": "sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.12.tgz", + "integrity": "sha512-xTNQNI/9xkHvjmCJnJOTyqDSl8uq1rKb2WOVmixQxFtRd7Oa3ecO8zM0cyC2YmOK+jHB9WPZ+F/ijkHg1CoORA==", "dev": true, "peer": true, "dependencies": { @@ -1943,20 +1631,21 @@ } }, "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-4.0.0.tgz", - "integrity": "sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-5.0.0.tgz", + "integrity": "sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ==", "dev": true, "peerDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-verify": "^2.0.0", "@typechain/ethers-v6": "^0.5.0", "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", "@types/mocha": ">=9.1.0", - "@types/node": ">=16.0.0", + "@types/node": ">=18.0.0", "chai": "^4.2.0", "ethers": "^6.4.0", "hardhat": "^2.11.0", @@ -1968,18 +1657,18 @@ } }, "node_modules/@nomicfoundation/hardhat-verify": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.3.tgz", - "integrity": "sha512-ESbRu9by53wu6VvgwtMtm108RSmuNsVqXtzg061D+/4R7jaWh/Wl/8ve+p6SdDX7vA1Z3L02hDO1Q3BY4luLXQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.12.tgz", + "integrity": "sha512-Lg3Nu7DCXASQRVI/YysjuAX2z8jwOCbS0w5tz2HalWGSTZThqA0v9N0v0psHbKNqzPJa8bNOeapIVSziyJTnAg==", "dev": true, "peer": true, "dependencies": { "@ethersproject/abi": "^5.1.2", "@ethersproject/address": "^5.0.2", "cbor": "^8.1.0", - "chalk": "^2.4.2", "debug": "^4.1.1", "lodash.clonedeep": "^4.5.0", + "picocolors": "^1.1.0", "semver": "^6.3.0", "table": "^6.8.0", "undici": "^5.14.0" @@ -1988,95 +1677,74 @@ "hardhat": "^2.0.4" } }, - "node_modules/@nomicfoundation/slang": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang/-/slang-0.17.0.tgz", - "integrity": "sha512-1GlkGRcGpVnjFw9Z1vvDKOKo2mzparFt7qrl2pDxWp+jrVtlvej98yCMX52pVyrYE7ZeOSZFnx/DtsSgoukStQ==", + "node_modules/@nomicfoundation/ignition-core": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.8.tgz", + "integrity": "sha512-U+CmTjKU9uwvh7qIabqboy/K/sDoClDgpsFRHoFvAj87DPDkXYb/mZBSkXPTU1wxTxrW6GTFE4lG3e7LAyF+kw==", + "dev": true, + "peer": true, "dependencies": { - "@nomicfoundation/slang-darwin-arm64": "0.17.0", - "@nomicfoundation/slang-darwin-x64": "0.17.0", - "@nomicfoundation/slang-linux-arm64-gnu": "0.17.0", - "@nomicfoundation/slang-linux-arm64-musl": "0.17.0", - "@nomicfoundation/slang-linux-x64-gnu": "0.17.0", - "@nomicfoundation/slang-linux-x64-musl": "0.17.0", - "@nomicfoundation/slang-win32-arm64-msvc": "0.17.0", - "@nomicfoundation/slang-win32-ia32-msvc": "0.17.0", - "@nomicfoundation/slang-win32-x64-msvc": "0.17.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/slang-darwin-arm64": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-darwin-arm64/-/slang-darwin-arm64-0.17.0.tgz", - "integrity": "sha512-O0q94EUtoWy9A5kOTOa9/khtxXDYnLqmuda9pQELurSiwbQEVCPQL8kb34VbOW+ifdre66JM/05Xw9JWhIZ9sA==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/slang-darwin-x64": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-darwin-x64/-/slang-darwin-x64-0.17.0.tgz", - "integrity": "sha512-IaDbHzvT08sBK2HyGzonWhq1uu8IxdjmTqAWHr25Oh/PYnamdi8u4qchZXXYKz/DHLoYN3vIpBXoqLQIomhD/g==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/slang-linux-arm64-gnu": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-arm64-gnu/-/slang-linux-arm64-gnu-0.17.0.tgz", - "integrity": "sha512-Lj4anvOsQZxs1SycG8VyT2Rl2oqIhyLSUCgGepTt3CiJ/bM+8r8bLJIgh8vKkki4BWz49YsYIgaJB2IPv8FFTw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/slang-linux-arm64-musl": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-arm64-musl/-/slang-linux-arm64-musl-0.17.0.tgz", - "integrity": "sha512-/xkTCa9d5SIWUBQE3BmLqDFfJRr4yUBwbl4ynPiGUpRXrD69cs6pWKkwjwz/FdBpXqVo36I+zY95qzoTj/YhOA==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/slang-linux-x64-gnu": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-gnu/-/slang-linux-x64-gnu-0.17.0.tgz", - "integrity": "sha512-oe5IO5vntOqYvTd67deCHPIWuSuWm6aYtT2/0Kqz2/VLtGz4ClEulBSRwfnNzBVtw2nksWipE1w8BzhImI7Syg==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/slang-linux-x64-musl": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-musl/-/slang-linux-x64-musl-0.17.0.tgz", - "integrity": "sha512-PpYCI5K/kgLAMXaPY0V4VST5gCDprEOh7z/47tbI8kJQumI5odjsj/Cs8MpTo7/uRH6flKYbVNgUzcocWVYrAQ==", - "engines": { - "node": ">= 10" + "@ethersproject/address": "5.6.1", + "@nomicfoundation/solidity-analyzer": "^0.1.1", + "cbor": "^9.0.0", + "debug": "^4.3.2", + "ethers": "^6.7.0", + "fs-extra": "^10.0.0", + "immer": "10.0.2", + "lodash": "4.17.21", + "ndjson": "2.0.0" + } + }, + "node_modules/@nomicfoundation/ignition-core/node_modules/@ethersproject/address": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.1.tgz", + "integrity": "sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.6.2", + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/keccak256": "^5.6.1", + "@ethersproject/logger": "^5.6.0", + "@ethersproject/rlp": "^5.6.1" } }, - "node_modules/@nomicfoundation/slang-win32-arm64-msvc": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-arm64-msvc/-/slang-win32-arm64-msvc-0.17.0.tgz", - "integrity": "sha512-u/Mkf7OjokdBilP7QOJj6QYJU4/mjkbKnTX21wLyCIzeVWS7yafRPYpBycKIBj2pRRZ6ceAY5EqRpb0aiCq+0Q==", + "node_modules/@nomicfoundation/ignition-core/node_modules/cbor": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.2.tgz", + "integrity": "sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==", + "dev": true, + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, "engines": { - "node": ">= 10" + "node": ">=16" } }, - "node_modules/@nomicfoundation/slang-win32-ia32-msvc": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-ia32-msvc/-/slang-win32-ia32-msvc-0.17.0.tgz", - "integrity": "sha512-XJBVQfNnZQUv0tP2JSJ573S+pmgrLWgqSZOGaMllnB/TL1gRci4Z7dYRJUF2s82GlRJE+FHSI2Ro6JISKmlXCg==", - "engines": { - "node": ">= 10" - } + "node_modules/@nomicfoundation/ignition-ui": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.8.tgz", + "integrity": "sha512-VUD5MsWrrv7E2P0AJO01pV8w8m66Du0uwBKXM0oUV5DRIzqm6eYHt9eCDb1KBINDpiFxOQiuyWQMdeKxgPp3qw==", + "dev": true, + "peer": true }, - "node_modules/@nomicfoundation/slang-win32-x64-msvc": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-x64-msvc/-/slang-win32-x64-msvc-0.17.0.tgz", - "integrity": "sha512-zPGsAeiTfqfPNYHD8BfrahQmYzA78ZraoHKTGraq/1xwJwzBK4bu/NtvVA4pJjBV+B4L6DCxVhSbpn40q26JQA==", - "engines": { - "node": ">= 10" + "node_modules/@nomicfoundation/slang": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang/-/slang-0.18.3.tgz", + "integrity": "sha512-YqAWgckqbHM0/CZxi9Nlf4hjk9wUNLC9ngWCWBiqMxPIZmzsVKYuChdlrfeBPQyvQQBoOhbx+7C1005kLVQDZQ==", + "dependencies": { + "@bytecodealliance/preview2-shim": "0.17.0" } }, "node_modules/@nomicfoundation/solidity-analyzer": { @@ -2115,11 +1783,11 @@ } }, "node_modules/@openzeppelin/upgrades-core": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.40.0.tgz", - "integrity": "sha512-4bPSXdEqHsNRL5T1ybPLneWGYjzGl6XWGWkv7aUoFFgz8mOdarstRBX1Wi4XJFw6IeHPUI7mMSQr2jdz8Y2ypQ==", + "version": "1.41.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.41.0.tgz", + "integrity": "sha512-+oryinqZnxkiZvg7bWqWX4Ki/CNwVUZEqC6Elpi5PQoahpL3/6Sq9xjIozD5AiI2O61h8JHQ+A//5NtczyavJw==", "dependencies": { - "@nomicfoundation/slang": "^0.17.0", + "@nomicfoundation/slang": "^0.18.3", "cbor": "^9.0.0", "chalk": "^4.1.0", "compare-versions": "^6.0.0", @@ -2134,20 +1802,6 @@ "openzeppelin-upgrades-core": "dist/cli/cli.js" } }, - "node_modules/@openzeppelin/upgrades-core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@openzeppelin/upgrades-core/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -2167,45 +1821,6 @@ "node": ">=16" } }, - "node_modules/@openzeppelin/upgrades-core/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@openzeppelin/upgrades-core/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@openzeppelin/upgrades-core/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/@openzeppelin/upgrades-core/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/@openzeppelin/upgrades-core/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -2220,17 +1835,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@openzeppelin/upgrades-core/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@pnpm/config.env-replace": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", @@ -2259,9 +1863,9 @@ "dev": true }, "node_modules/@pnpm/npm-conf": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz", - "integrity": "sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", "dev": true, "dependencies": { "@pnpm/config.env-replace": "^1.1.0", @@ -2272,6 +1876,70 @@ "node": ">=12" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, "node_modules/@scure/base": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", @@ -2281,33 +1949,39 @@ } }, "node_modules/@scure/bip32": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", - "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "peer": true, "dependencies": { - "@noble/curves": "~1.1.0", - "@noble/hashes": "~1.3.1", - "@scure/base": "~1.1.0" + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip32/node_modules/@noble/curves": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", - "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "peer": true, "dependencies": { - "@noble/hashes": "1.3.1" + "@noble/hashes": "1.4.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip32/node_modules/@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "peer": true, "engines": { "node": ">= 16" }, @@ -2316,12 +1990,27 @@ } }, "node_modules/@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "peer": true, "dependencies": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -2487,22 +2176,30 @@ "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "devOptional": true, + "peer": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "devOptional": true, + "peer": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "devOptional": true, + "peer": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "devOptional": true, + "peer": true }, "node_modules/@typechain/ethers-v6": { "version": "0.5.1", @@ -2536,21 +2233,37 @@ "typechain": "^8.3.2" } }, - "node_modules/@types/bn.js": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", - "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/chai": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", - "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", + "node_modules/@typechain/hardhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, - "peer": true - }, + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "peer": true + }, "node_modules/@types/chai-as-promised": { "version": "7.1.8", "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", @@ -2581,6 +2294,8 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "peer": true, "dependencies": { "@types/minimatch": "*", "@types/node": "*" @@ -2592,6 +2307,12 @@ "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", "dev": true }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", + "dev": true + }, "node_modules/@types/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", @@ -2600,23 +2321,30 @@ "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==" + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "peer": true }, "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true, "peer": true }, "node_modules/@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "node_modules/@types/pbkdf2": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", @@ -2628,26 +2356,14 @@ "node_modules/@types/prettier": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true, + "peer": true }, "node_modules/@types/qs": { - "version": "6.9.10", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz", - "integrity": "sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==" - }, - "node_modules/@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - } - }, - "node_modules/@types/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==" }, "node_modules/@types/secp256k1": { "version": "4.0.6", @@ -2657,54 +2373,19 @@ "@types/node": "*" } }, - "node_modules/@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==" - }, - "node_modules/abitype": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.7.1.tgz", - "integrity": "sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ==", - "peerDependencies": { - "typescript": ">=4.9.4", - "zod": "^3 >=3.19.1" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, - "node_modules/abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", - "dependencies": { - "buffer": "^6.0.3", - "catering": "^2.1.0", - "is-buffer": "^2.0.5", - "level-supports": "^4.0.0", - "level-transcoder": "^1.0.1", - "module-error": "^1.0.1", - "queue-microtask": "^1.2.3" - }, - "engines": { - "node": ">=12" - } + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "dev": true, + "peer": true }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "devOptional": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2716,18 +2397,12 @@ "version": "8.3.1", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "devOptional": true, + "peer": true, "engines": { "node": ">=0.4.0" } }, - "node_modules/address": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", - "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/adm-zip": { "version": "0.4.16", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", @@ -2765,14 +2440,15 @@ } }, "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -2783,10 +2459,42 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=0.4.2" } }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-align/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-align/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -2818,20 +2526,23 @@ } }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/antlr4": { - "version": "4.13.1-patch-1", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.1-patch-1.tgz", - "integrity": "sha512-OjFLWWLzDMV9rdFhpvroCWR4ooktNg9/nvVYSA5z28wuVpU36QUNuioR1XLnQtcjVlf8npjyz593PxnU/f/Cow==", + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.2.tgz", + "integrity": "sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg==", "dev": true, "engines": { "node": ">=16" @@ -2842,11 +2553,6 @@ "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==" }, - "node_modules/any-signal": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-3.0.1.tgz", - "integrity": "sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg==" - }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -2862,7 +2568,9 @@ "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "devOptional": true, + "peer": true }, "node_modules/argparse": { "version": "2.0.1", @@ -2873,6 +2581,8 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "peer": true, "engines": { "node": ">=6" } @@ -2881,6 +2591,8 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -2902,6 +2614,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "peer": true, "engines": { "node": "*" } @@ -2916,6 +2630,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, "engines": { "node": ">=8" } @@ -2923,7 +2638,9 @@ "node_modules/async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true, + "peer": true }, "node_modules/asynckit": { "version": "0.4.0", @@ -2934,30 +2651,19 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "peer": true, "engines": { "node": ">= 4.0.0" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -2979,6 +2685,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, "funding": [ { "type": "github", @@ -2999,48 +2706,93 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, - "node_modules/bigint-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", - "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.3.0" - }, + "node_modules/big-integer": { + "version": "1.6.36", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", + "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "dev": true, "engines": { - "node": ">= 10.0.0" + "node": ">=0.6" } }, - "node_modules/bigint-crypto-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", - "integrity": "sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==", + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "engines": { - "node": ">=14.0.0" + "node": ">=8" } }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "node_modules/bip174": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.1.tgz", + "integrity": "sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==", + "dev": true, + "license": "MIT", "engines": { - "node": "*" + "node": ">=8.0.0" } }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "dev": true, + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bitcoinjs-lib": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.5.tgz", + "integrity": "sha512-yuf6xs9QX/E8LWE2aMJPNd0IxGofwfuVOiYdNUESkc+2bHHVKjhJd8qewqapeoolh9fihzHGoDCB5Vkr57RZCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bech32": "^2.0.0", + "bip174": "^2.1.1", + "bs58check": "^3.0.1", + "typeforce": "^1.11.3", + "varuint-bitcoin": "^1.1.2" + }, "engines": { - "node": ">=8" + "node": ">=8.0.0" + } + }, + "node_modules/bitcoinjs-lib/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bitcoinjs-lib/node_modules/bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", + "dev": true, + "license": "MIT" + }, + "node_modules/bitcoinjs-lib/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "node_modules/bitcoinjs-lib/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dev": true, + "license": "MIT", "dependencies": { - "file-uri-to-path": "1.0.0" + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" } }, "node_modules/blakejs": { @@ -3053,6 +2805,59 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/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/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3063,11 +2868,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3078,17 +2883,6 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, - "node_modules/browser-level": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", - "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", - "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.1", - "module-error": "^1.0.2", - "run-parallel-limit": "^1.1.0" - } - }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -3129,6 +2923,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "funding": [ { "type": "github", @@ -3231,31 +3026,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/case": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, - "node_modules/catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "engines": { - "node": ">=6" - } - }, "node_modules/cbor": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "dev": true, + "peer": true, "dependencies": { "nofilter": "^3.1.0" }, @@ -3264,9 +3045,11 @@ } }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "peer": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -3274,34 +3057,38 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" } }, "node_modules/chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", + "dev": true, + "peer": true, "dependencies": { "check-error": "^1.0.2" }, "peerDependencies": { - "chai": ">= 2.1.2 < 5" + "chai": ">= 2.1.2 < 6" } }, "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==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/charenc": { @@ -3316,6 +3103,8 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "peer": true, "dependencies": { "get-func-name": "^2.0.2" }, @@ -3363,22 +3152,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", - "hasInstallScript": true, - "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.0", - "module-error": "^1.0.1", - "napi-macros": "^2.2.2", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -3387,6 +3160,17 @@ "node": ">=6" } }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-table3": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", @@ -3434,17 +3218,20 @@ } }, "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==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "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==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/colors": { "version": "1.4.0", @@ -3474,6 +3261,8 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "peer": true, "dependencies": { "array-back": "^3.1.0", "find-replace": "^3.0.0", @@ -3488,6 +3277,8 @@ "version": "6.1.3", "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "peer": true, "dependencies": { "array-back": "^4.0.2", "chalk": "^2.4.2", @@ -3498,26 +3289,102 @@ "node": ">=8.0.0" } }, + "node_modules/command-line-usage/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/command-line-usage/node_modules/array-back": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } }, + "node_modules/command-line-usage/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==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/command-line-usage/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==", + "dev": true, + "peer": true + }, + "node_modules/command-line-usage/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==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/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==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/command-line-usage/node_modules/typical": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } }, "node_modules/commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } }, "node_modules/compare-versions": { "version": "6.1.1", @@ -3619,16 +3486,11 @@ } } }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } + "node_modules/cosmjs-types": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", + "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==", + "dev": true }, "node_modules/create-hash": { "version": "1.2.0", @@ -3658,15 +3520,9 @@ "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dependencies": { - "node-fetch": "^2.6.12" - } + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "devOptional": true, + "peer": true }, "node_modules/crypt": { "version": "0.0.2", @@ -3676,10 +3532,27 @@ "node": "*" } }, + "node_modules/crypto-addr-codec": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.8.tgz", + "integrity": "sha512-GqAK90iLLgP3FvhNmHbpT3wR6dEdaM8hZyZtLX29SPardh3OA13RFLHDR6sntGCgRWOfiHqW6sIyohpNqOtV/g==", + "dev": true, + "dependencies": { + "base-x": "^3.0.8", + "big-integer": "1.6.36", + "blakejs": "^1.1.0", + "bs58": "^4.0.1", + "ripemd160-min": "0.0.6", + "safe-buffer": "^5.2.0", + "sha3": "^2.1.1" + } + }, "node_modules/death": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==" + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "dev": true, + "peer": true }, "node_modules/debug": { "version": "4.3.4", @@ -3708,11 +3581,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" - }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -3741,9 +3609,11 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "peer": true, "dependencies": { "type-detect": "^4.0.0" }, @@ -3755,6 +3625,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, "engines": { "node": ">=4.0.0" } @@ -3762,7 +3633,9 @@ "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==" + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true }, "node_modules/defer-to-connect": { "version": "2.0.1", @@ -3789,6 +3662,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "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", @@ -3805,19 +3695,6 @@ "node": ">= 0.8" } }, - "node_modules/detect-port": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", - "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", - "dependencies": { - "address": "^1.0.1", - "debug": "4" - }, - "bin": { - "detect": "bin/detect-port.js", - "detect-port": "bin/detect-port.js" - } - }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -3830,6 +3707,8 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "dev": true, + "peer": true, "dependencies": { "heap": ">= 0.2.0" }, @@ -3841,6 +3720,8 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "peer": true, "dependencies": { "path-type": "^4.0.0" }, @@ -3849,14 +3730,30 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "dev": true, "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" + } + }, + "node_modules/ecpair": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ecpair/-/ecpair-2.1.0.tgz", + "integrity": "sha512-cL/mh3MtJutFOvFc27GPZE2pWL3a3k4YvzUWEOvilnfZVlH3Jwgx/7d6tlD7/75tNk8TG2m+7Kgtz0SI1tWcqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "randombytes": "^2.1.0", + "typeforce": "^1.18.0", + "wif": "^2.0.6" + }, + "engines": { + "node": ">=8.0.0" } }, "node_modules/elliptic": { @@ -3943,6 +3840,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -3951,6 +3849,8 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", + "dev": true, + "peer": true, "dependencies": { "esprima": "^2.7.1", "estraverse": "^1.9.1", @@ -3968,10 +3868,21 @@ "source-map": "~0.2.0" } }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "dev": true, + "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3984,6 +3895,8 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -3992,6 +3905,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -4125,11 +4040,26 @@ } }, "node_modules/ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz", + "integrity": "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==", + "dev": true, + "peer": true, "dependencies": { - "js-sha3": "^0.8.0" + "@noble/hashes": "^1.4.0" + } + }, + "node_modules/ethereum-bloom-filters/node_modules/@noble/hashes": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==", + "dev": true, + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/ethereum-cryptography": { @@ -4205,10 +4135,33 @@ "node": ">=10.0.0" } }, + "node_modules/ethereumjs-wallet": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", + "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", + "deprecated": "New package name format for new versions: @ethereumjs/wallet. Please update.", + "dev": true, + "dependencies": { + "aes-js": "^3.1.2", + "bs58check": "^2.1.2", + "ethereum-cryptography": "^0.1.3", + "ethereumjs-util": "^7.1.2", + "randombytes": "^2.1.0", + "scrypt-js": "^3.0.1", + "utf8": "^3.0.0", + "uuid": "^8.3.2" + } + }, + "node_modules/ethereumjs-wallet/node_modules/aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "dev": true + }, "node_modules/ethers": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.9.0.tgz", - "integrity": "sha512-pmfNyQzc2mseLe91FnT2vmNaTt8dDzhxZ/xItAV7uGsF4dI4ek2ufMu3rAkgQETL/TIs0GS5A+U05g9QyWnv3Q==", + "version": "6.13.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.4.tgz", + "integrity": "sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==", "funding": [ { "type": "individual", @@ -4220,27 +4173,24 @@ } ], "dependencies": { - "@adraffy/ens-normalize": "1.10.0", + "@adraffy/ens-normalize": "1.10.1", "@noble/curves": "1.2.0", "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", + "@types/node": "22.7.5", "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" + "tslib": "2.7.0", + "ws": "8.17.1" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/ethers/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" - }, "node_modules/ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dev": true, + "peer": true, "dependencies": { "bn.js": "4.11.6", "number-to-bn": "1.7.0" @@ -4253,7 +4203,9 @@ "node_modules/ethjs-unit/node_modules/bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "peer": true }, "node_modules/ethjs-util": { "version": "0.1.6", @@ -4268,19 +4220,6 @@ "npm": ">=3" } }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" - }, - "node_modules/eventsource": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", - "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -4293,7 +4232,8 @@ "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==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-diff": { "version": "1.3.0", @@ -4305,6 +4245,8 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "peer": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -4325,25 +4267,30 @@ "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==" + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "peer": true + }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "dev": true }, "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==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "peer": true, "dependencies": { "reusify": "^1.0.4" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -4355,6 +4302,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "peer": true, "dependencies": { "array-back": "^3.0.1" }, @@ -4362,17 +4311,6 @@ "node": ">=4.0.0" } }, - "node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -4382,9 +4320,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", @@ -4400,18 +4338,10 @@ } } }, - "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==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4436,17 +4366,18 @@ "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==" }, "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "peer": true, "dependencies": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/fs-readdir-recursive": { @@ -4480,11 +4411,6 @@ "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/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4497,6 +4423,8 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "peer": true, "engines": { "node": "*" } @@ -4543,6 +4471,8 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "dev": true, + "peer": true, "dependencies": { "chalk": "^2.4.2", "node-emoji": "^1.10.0" @@ -4551,6 +4481,74 @@ "testrpc-sc": "index.js" } }, + "node_modules/ghost-testrpc/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/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==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/ghost-testrpc/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==", + "dev": true, + "peer": true + }, + "node_modules/ghost-testrpc/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==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/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==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -4585,6 +4583,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "peer": true, "dependencies": { "global-prefix": "^3.0.0" }, @@ -4596,6 +4596,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "peer": true, "dependencies": { "ini": "^1.3.5", "kind-of": "^6.0.2", @@ -4605,10 +4607,28 @@ "node": ">=6" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "peer": true, "dependencies": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", @@ -4624,11 +4644,11 @@ } }, "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" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4668,6 +4688,8 @@ "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "peer": true, "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.2", @@ -4688,27 +4710,23 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/hardhat": { - "version": "2.19.3", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.19.3.tgz", - "integrity": "sha512-zUvfILiu1O7W1a+t5E1nCJ6z1danRLNizQkSEQCCgDYcRx13AGXtH1MVZajKmdLmXIjKAPReTp/8JQQ4ZHaX3g==", + "version": "2.22.17", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.17.tgz", + "integrity": "sha512-tDlI475ccz4d/dajnADUTRc1OJ3H8fpP9sWhXhBPpYsQOg8JHq5xrDimo53UhWPl7KJmAeDCm1bFG74xvpGRpg==", "dependencies": { "@ethersproject/abi": "^5.1.2", "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@nomicfoundation/ethereumjs-vm": "7.0.2", + "@nomicfoundation/edr": "^0.6.5", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "@types/bn.js": "^5.1.0", @@ -4716,31 +4734,33 @@ "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", - "chalk": "^2.4.2", - "chokidar": "^3.4.0", + "boxen": "^5.1.2", + "chokidar": "^4.0.0", "ci-info": "^2.0.0", "debug": "^4.1.1", "enquirer": "^2.3.0", "env-paths": "^2.2.0", "ethereum-cryptography": "^1.0.3", "ethereumjs-abi": "^0.6.8", - "find-up": "^2.1.0", + "find-up": "^5.0.0", "fp-ts": "1.19.3", "fs-extra": "^7.0.1", - "glob": "7.2.0", "immutable": "^4.0.0-rc.12", "io-ts": "1.10.4", + "json-stream-stringify": "^3.1.4", "keccak": "^3.0.2", "lodash": "^4.17.11", "mnemonist": "^0.38.0", "mocha": "^10.0.0", "p-map": "^4.0.0", + "picocolors": "^1.1.0", "raw-body": "^2.4.1", "resolve": "1.17.0", "semver": "^6.3.0", - "solc": "0.7.3", + "solc": "0.8.26", "source-map-support": "^0.5.13", "stacktrace-parser": "^0.1.10", + "tinyglobby": "^0.2.6", "tsort": "0.0.1", "undici": "^5.14.0", "uuid": "^8.3.2", @@ -4763,9 +4783,9 @@ } }, "node_modules/hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz", + "integrity": "sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==", "dependencies": { "array-uniq": "1.0.3", "eth-gas-reporter": "^0.2.25", @@ -4817,6 +4837,28 @@ "@scure/base": "~1.1.0" } }, + "node_modules/hardhat/node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, "node_modules/hardhat/node_modules/ethereum-cryptography": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", @@ -4828,6 +4870,21 @@ "@scure/bip39": "1.1.1" } }, + "node_modules/hardhat/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/hardhat/node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -4849,6 +4906,96 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/hardhat/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hardhat/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hardhat/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hardhat/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hardhat/node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/solc": { + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", + "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/hardhat/node_modules/solc/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/hardhat/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -4878,11 +5025,11 @@ } }, "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==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-property-descriptors": { @@ -4897,20 +5044,12 @@ } }, "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" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", + "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", + "dependencies": { + "call-bind": "^1.0.7" }, - "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" }, @@ -4918,13 +5057,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dependencies": { - "has-symbols": "^1.0.3" - }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "engines": { "node": ">= 0.4" }, @@ -4955,9 +5091,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -4976,7 +5112,9 @@ "node_modules/heap": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==" + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true, + "peer": true }, "node_modules/hmac-drbg": { "version": "1.0.1", @@ -5076,6 +5214,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -5092,13 +5231,25 @@ ] }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, "engines": { "node": ">= 4" } }, + "node_modules/immer": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.2.tgz", + "integrity": "sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA==", + "dev": true, + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/immutable": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", @@ -5154,12 +5305,14 @@ "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, "engines": { "node": ">= 0.10" } @@ -5172,21 +5325,6 @@ "fp-ts": "^1.0.0" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "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-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5204,39 +5342,6 @@ "node": ">=8" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, - "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/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -5253,20 +5358,6 @@ "node": ">=4" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -5303,20 +5394,6 @@ "node": ">=8" } }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -5336,25 +5413,19 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "peer": true }, "node_modules/isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "dev": true, "peerDependencies": { "ws": "*" } }, - "node_modules/js-sdsl": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", - "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -5377,14 +5448,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -5400,12 +5463,43 @@ "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/json-stream-stringify": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", + "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", + "engines": { + "node": ">=7.10.1" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "peer": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "peer": true, "dependencies": { "universalify": "^2.0.0" }, @@ -5417,6 +5511,8 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "dev": true, + "peer": true, "engines": { "node": "*" } @@ -5448,16 +5544,20 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", - "optionalDependencies": { - "graceful-fs": "^4.1.9" + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" } }, "node_modules/latest-version": { @@ -5475,67 +5575,113 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "peer": true, "dependencies": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" }, "engines": { - "node": ">=12" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/level" + "node": ">= 0.8.0" } }, - "node_modules/level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "node_modules/libsodium-sumo": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.7.15.tgz", + "integrity": "sha512-5tPmqPmq8T8Nikpm1Nqj0hBHvsLFCXvdhBFV7SGOitQPZAA6jso8XoL0r4L7vmfKXr486fiQInvErHtEvizFMw==", + "dev": true + }, + "node_modules/libsodium-wrappers-sumo": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.15.tgz", + "integrity": "sha512-aSWY8wKDZh5TC7rMvEdTHoyppVq/1dTSAeAR7H6pzd6QRT3vQWcT5pGwCotLcpPEOLXX6VvqihSPkpEhYAjANA==", + "dev": true, + "dependencies": { + "libsodium-sumo": "^0.7.15" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/link-module-alias": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/link-module-alias/-/link-module-alias-1.2.0.tgz", + "integrity": "sha512-ahPjXepbSVKbahTB6LxR//VHm8HPfI+QQygCH+E82spBY4HR5VPJTvlhKBc9F7muVxnS6C1rRfoPOXAbWO/fyw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.1" + }, + "bin": { + "link-module-alias": "index.js" + }, "engines": { - "node": ">=12" + "node": "> 8.0.0" } }, - "node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "node_modules/link-module-alias/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==", + "dev": true, "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "node_modules/link-module-alias/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==", + "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=4" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "node_modules/link-module-alias/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==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/link-module-alias/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==", "dev": true }, - "node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "node_modules/link-module-alias/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==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/link-module-alias/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==", + "dev": true, "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "has-flag": "^3.0.0" }, "engines": { "node": ">=4" @@ -5549,22 +5695,29 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "peer": true }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "peer": true }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true, + "peer": true }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", @@ -5581,74 +5734,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/log-symbols/node_modules/has-flag": { + "node_modules/long": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true }, "node_modules/loupe": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "peer": true, "dependencies": { "get-func-name": "^2.0.1" } @@ -5670,32 +5767,18 @@ "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" }, - "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==", - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "devOptional": true, + "peer": true }, "node_modules/markdown-table": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==" }, - "node_modules/mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", - "engines": { - "node": ">=8.9.0" - } - }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -5706,19 +5789,6 @@ "safe-buffer": "^5.1.2" } }, - "node_modules/memory-level": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", - "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", - "dependencies": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -5731,6 +5801,8 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "peer": true, "engines": { "node": ">= 8" } @@ -5738,14 +5810,18 @@ "node_modules/micro-ftch": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==" + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true, + "peer": true }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "peer": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -5816,6 +5892,8 @@ "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "peer": true, "dependencies": { "minimist": "^1.2.6" }, @@ -5912,14 +5990,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/mocha/node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -6000,14 +6070,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/module-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", - "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6024,15 +6086,32 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==" + "node_modules/ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", + "dev": true, + "peer": true, + "dependencies": { + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "ndjson": "cli.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true }, "node_modules/node-addon-api": { "version": "2.0.2", @@ -6043,29 +6122,12 @@ "version": "1.11.0", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "peer": true, "dependencies": { "lodash": "^4.17.21" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-gyp-build": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", @@ -6088,6 +6150,8 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "peer": true, "dependencies": { "abbrev": "1" }, @@ -6119,6 +6183,8 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "dev": true, + "peer": true, "dependencies": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" @@ -6131,7 +6197,9 @@ "node_modules/number-to-bn/node_modules/bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "peer": true }, "node_modules/object-assign": { "version": "4.1.1", @@ -6142,13 +6210,25 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "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==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/obliterator": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", @@ -6166,6 +6246,8 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "peer": true, "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -6181,7 +6263,9 @@ "node_modules/ordinal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", - "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==" + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true, + "peer": true }, "node_modules/os-tmpdir": { "version": "1.0.2", @@ -6200,28 +6284,6 @@ "node": ">=12.20" } }, - "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -6236,14 +6298,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "engines": { - "node": ">=4" - } - }, "node_modules/package-json": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", @@ -6309,14 +6363,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "engines": { - "node": ">=4" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -6334,6 +6380,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, "engines": { "node": ">=8" } @@ -6342,6 +6389,8 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "peer": true, "engines": { "node": "*" } @@ -6362,10 +6411,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -6382,6 +6430,8 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "peer": true, "engines": { "node": ">=6" } @@ -6395,18 +6445,12 @@ "node": ">=4" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "engines": { - "node": ">= 0.4" - } - }, "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==", + "dev": true, + "peer": true, "engines": { "node": ">= 0.8.0" } @@ -6415,6 +6459,7 @@ "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, "bin": { "prettier": "bin-prettier.js" }, @@ -6438,6 +6483,20 @@ "asap": "~2.0.6" } }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "peer": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/proper-lockfile": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", @@ -6454,6 +6513,32 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", "dev": true }, + "node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -6463,16 +6548,17 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "engines": { "node": ">=6" } }, "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", + "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -6485,6 +6571,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -6498,7 +6585,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "peer": true }, "node_modules/quick-lru": { "version": "5.1.1", @@ -6582,10 +6670,17 @@ "node": ">=8.10.0" } }, + "node_modules/readonly-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", + "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==", + "dev": true + }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, "dependencies": { "resolve": "^1.1.6" }, @@ -6597,6 +6692,8 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "dev": true, + "peer": true, "dependencies": { "minimatch": "^3.0.5" }, @@ -6608,14 +6705,16 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "peer": true, "engines": { "node": ">=6" } }, "node_modules/registry-auth-token": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", - "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.3.tgz", + "integrity": "sha512-1bpc9IyC+e+CNFRaWyn77tk4xGG4PPUyfakSmA6F6cvUDjrm58dfyJ3II+9yb10EDkHoy1LaPSmHaWLOH3m6HA==", "dev": true, "dependencies": { "@pnpm/npm-conf": "^2.1.0" @@ -6673,6 +6772,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -6729,22 +6829,13 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -6754,6 +6845,15 @@ "inherits": "^2.0.1" } }, + "node_modules/ripemd160-min": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", + "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/rlp": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", @@ -6769,6 +6869,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -6783,37 +6884,11 @@ "url": "https://feross.org/support" } ], + "peer": true, "dependencies": { "queue-microtask": "^1.2.2" } }, - "node_modules/run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", - "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/rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6842,6 +6917,8 @@ "version": "0.4.6", "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "dev": true, + "peer": true, "dependencies": { "abbrev": "1.0.x", "async": "1.x", @@ -6866,6 +6943,8 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "peer": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -6874,6 +6953,9 @@ "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "peer": true, "dependencies": { "inflight": "^1.0.4", "inherits": "2", @@ -6889,6 +6971,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -6897,6 +6981,8 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "peer": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -6909,6 +6995,8 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -6920,12 +7008,16 @@ "node_modules/sc-istanbul/node_modules/resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==" + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true, + "peer": true }, "node_modules/sc-istanbul/node_modules/supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "dev": true, + "peer": true, "dependencies": { "has-flag": "^1.0.0" }, @@ -7018,10 +7110,20 @@ "node": "*" } }, + "node_modules/sha3": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", + "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", + "dev": true, + "dependencies": { + "buffer": "6.0.3" + } + }, "node_modules/shelljs": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -7034,14 +7136,34 @@ "node": ">=4" } }, + "node_modules/shx": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", + "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", + "dev": true, + "dependencies": { + "minimist": "^1.2.3", + "shelljs": "^0.8.5" + }, + "bin": { + "shx": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "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==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7052,10 +7174,19 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "peer": true + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -7064,6 +7195,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -7076,99 +7208,20 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } }, - "node_modules/solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", - "dependencies": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "bin": { - "solcjs": "solcjs" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/solc/node_modules/fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "node_modules/solc/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/solc/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/solhint": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-5.0.1.tgz", - "integrity": "sha512-QeQLS9HGCnIiibt+xiOa/+MuP7BWz9N7C5+Mj9pLHshdkNhuo3AzCpWmjfWVZBUuwIUO3YyCRVIcYLR3YOKGfg==", - "dev": true, + "node_modules/solhint": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-5.0.3.tgz", + "integrity": "sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ==", + "dev": true, "dependencies": { "@solidity-parser/parser": "^0.18.0", "ajv": "^6.12.6", @@ -7218,21 +7271,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/solhint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/solhint/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -7242,49 +7280,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/solhint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/solhint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/solhint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/solhint/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, "node_modules/solhint/node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -7305,15 +7300,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/solhint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/solhint/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -7344,41 +7330,30 @@ "node": ">=10" } }, - "node_modules/solhint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/solidity-ast": { "version": "0.4.59", "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.59.tgz", "integrity": "sha512-I+CX0wrYUN9jDfYtcgWSe+OAowaXy8/1YQy7NS4ni5IBDmIYBq7ZzaP/7QqouLjzZapmQtvGLqCaYgoUWqBo5g==" }, "node_modules/solidity-coverage": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", - "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", + "version": "0.8.14", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.14.tgz", + "integrity": "sha512-ItAAObe5GaEOp20kXC2BZRnph+9P7Rtoqg2mQc2SXGEHgSDF2wWd1Wxz3ntzQWXkbCtIIGdJT918HG00cObwbA==", + "dev": true, + "peer": true, "dependencies": { "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.16.0", + "@solidity-parser/parser": "^0.19.0", "chalk": "^2.4.2", "death": "^1.1.0", - "detect-port": "^1.3.0", "difflib": "^0.2.4", "fs-extra": "^8.1.0", "ghost-testrpc": "^0.0.2", "global-modules": "^2.0.0", "globby": "^10.0.1", "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "mocha": "10.2.0", + "lodash": "^4.17.21", + "mocha": "^10.2.0", "node-emoji": "^1.10.0", "pify": "^4.0.1", "recursive-readdir": "^2.2.2", @@ -7395,17 +7370,63 @@ } }, "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.2.tgz", - "integrity": "sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.19.0.tgz", + "integrity": "sha512-RV16k/qIxW/wWc+mLzV3ARyKUaMUTBy9tOLMzFhtNSKYeTAanQ3a5MudJKf/8arIFnA2L27SNjarQKmFg0w/jA==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/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==", + "dev": true, + "peer": true, "dependencies": { - "antlr4ts": "^0.5.0-alpha.4" + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/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==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "1.1.3" } }, + "node_modules/solidity-coverage/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==", + "dev": true, + "peer": true + }, "node_modules/solidity-coverage/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "peer": true, "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -7415,56 +7436,69 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/solidity-coverage/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==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/solidity-coverage/node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, - "node_modules/solidity-coverage/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" + "node_modules/solidity-coverage/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "peer": true, + "bin": { + "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, - "node_modules/solidity-coverage/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/solidity-coverage/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==", + "dev": true, + "peer": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=4" } }, "node_modules/solidity-coverage/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "peer": true, "engines": { "node": ">= 4.0.0" } }, - "node_modules/solidity-coverage/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/source-map": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", + "dev": true, + "optional": true, + "peer": true, "dependencies": { "amdefine": ">=0.0.4" }, @@ -7489,10 +7523,22 @@ "node": ">=0.10.0" } }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "peer": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "peer": true }, "node_modules/stacktrace-parser": { "version": "0.1.10", @@ -7532,7 +7578,9 @@ "node_modules/string-format": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", - "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==" + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "peer": true }, "node_modules/string-width": { "version": "2.1.1", @@ -7600,14 +7648,23 @@ } }, "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==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" + } + }, + "node_modules/symbol-observable": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz", + "integrity": "sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==", + "dev": true, + "engines": { + "node": ">=0.10" } }, "node_modules/sync-request": { @@ -7632,9 +7689,10 @@ } }, "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", + "dev": true, "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -7650,6 +7708,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "peer": true, "dependencies": { "array-back": "^4.0.1", "deep-extend": "~0.6.0", @@ -7664,6 +7724,8 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -7672,6 +7734,8 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -7680,6 +7744,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -7688,6 +7753,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7730,135 +7796,130 @@ "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" }, "node_modules/then-request/node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.2.tgz", + "integrity": "sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "mime-types": "^2.1.12", + "safe-buffer": "^5.2.1" }, "engines": { "node": ">= 0.12" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "peer": true, "dependencies": { - "os-tmpdir": "~1.0.2" + "readable-stream": "3" + } + }, + "node_modules/tiny-secp256k1": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-2.2.3.tgz", + "integrity": "sha512-SGcL07SxcPN2nGKHTCvRMkQLYPSoeFcvArUSCYtjVARiFAWU44cCIqYS0mYAU6nY7XfvwURuTIGo2Omt3ZQr0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "uint8array-tools": "0.0.7" }, "engines": { - "node": ">=0.6.0" + "node": ">=14.0.0" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/tinyglobby": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", + "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", "dependencies": { - "is-number": "^7.0.0" + "fdir": "^6.4.2", + "picomatch": "^4.0.2" }, "engines": { - "node": ">=8.0" + "node": ">=12.0.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/ts-command-line-args": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", - "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", - "dependencies": { - "chalk": "^4.1.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.0", - "string-format": "^2.0.0" - }, - "bin": { - "write-markdown": "dist/write-markdown.js" - } - }, - "node_modules/ts-command-line-args/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/ts-command-line-args/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "os-tmpdir": "~1.0.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=0.6.0" } }, - "node_modules/ts-command-line-args/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { - "color-name": "~1.1.4" + "is-number": "^7.0.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=8.0" } }, - "node_modules/ts-command-line-args/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/ts-command-line-args/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { - "node": ">=8" + "node": ">=0.6" } }, - "node_modules/ts-command-line-args/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "dev": true, + "peer": true, "dependencies": { - "has-flag": "^4.0.0" + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "write-markdown": "dist/write-markdown.js" } }, "node_modules/ts-essentials": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "peer": true, "peerDependencies": { "typescript": ">=3.7.0" } @@ -7867,6 +7928,8 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "devOptional": true, + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -7909,14 +7972,16 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "devOptional": true, + "peer": true, "engines": { "node": ">=0.3.1" } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "node_modules/tsort": { "version": "0.0.1", @@ -7937,6 +8002,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "peer": true, "dependencies": { "prelude-ls": "~1.1.2" }, @@ -7945,9 +8012,11 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "peer": true, "engines": { "node": ">=4" } @@ -7967,6 +8036,8 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", + "dev": true, + "peer": true, "dependencies": { "@types/prettier": "^2.1.1", "debug": "^4.3.1", @@ -7990,6 +8061,8 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "peer": true, "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -8003,6 +8076,9 @@ "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8022,6 +8098,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -8030,6 +8108,8 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "peer": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -8041,6 +8121,8 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "peer": true, "engines": { "node": ">= 4.0.0" } @@ -8050,10 +8132,19 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, + "node_modules/typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", + "dev": true, + "license": "MIT" + }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "devOptional": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8066,14 +8157,19 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } }, "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "optional": true, + "peer": true, "bin": { "uglifyjs": "bin/uglifyjs" }, @@ -8081,1271 +8177,96 @@ "node": ">=0.8.0" } }, - "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "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/utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "node_modules/web3": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-4.7.0.tgz", - "integrity": "sha512-3g+1e7B/IW0Nw9WP1dotrZKWD9o5IBfl27dxEnE1LxBZBax6ZkviiAwf18utIhlNBD07RgI+PPfKDXxfDBlHWA==", - "dependencies": { - "web3-core": "^4.3.2", - "web3-errors": "^1.1.4", - "web3-eth": "^4.5.0", - "web3-eth-abi": "^4.2.0", - "web3-eth-accounts": "^4.1.1", - "web3-eth-contract": "^4.3.0", - "web3-eth-ens": "^4.2.0", - "web3-eth-iban": "^4.0.7", - "web3-eth-personal": "^4.0.8", - "web3-net": "^4.0.7", - "web3-providers-http": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-rpc-methods": "^1.2.0", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.2", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-core": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-4.3.2.tgz", - "integrity": "sha512-uIMVd/j4BgOnwfpY8ZT+QKubOyM4xohEhFZXz9xB8wimXWMMlYVlIK/TbfHqFolS9uOerdSGhsMbcK9lETae8g==", - "dependencies": { - "web3-errors": "^1.1.4", - "web3-eth-accounts": "^4.1.0", - "web3-eth-iban": "^4.0.7", - "web3-providers-http": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-types": "^1.3.1", - "web3-utils": "^4.1.0", - "web3-validator": "^2.0.3" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - }, - "optionalDependencies": { - "web3-providers-ipc": "^4.0.7" - } - }, - "node_modules/web3-core/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-core/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-core/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-core/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-core/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-core/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-errors": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/web3-errors/-/web3-errors-1.1.4.tgz", - "integrity": "sha512-WahtszSqILez+83AxGecVroyZsMuuRT+KmQp4Si5P4Rnqbczno1k748PCrZTS1J4UCPmXMG2/Vt+0Bz2zwXkwQ==", - "dependencies": { - "web3-types": "^1.3.1" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-4.5.0.tgz", - "integrity": "sha512-crisE46o/SHMVm+XHAXEaR8k76NCImq+hi0QQEJ+VaLZbDobI/Gvog1HwTukDUDRgnYSAFGqD0cTRyAwDurwpA==", - "dependencies": { - "setimmediate": "^1.0.5", - "web3-core": "^4.3.2", - "web3-errors": "^1.1.4", - "web3-eth-abi": "^4.2.0", - "web3-eth-accounts": "^4.1.1", - "web3-net": "^4.0.7", - "web3-providers-ws": "^4.0.7", - "web3-rpc-methods": "^1.2.0", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.1", - "web3-validator": "^2.0.4" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-abi": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-4.2.0.tgz", - "integrity": "sha512-x7dUCmk6th+5N63s5kUusoNtsDJKUUQgl9+jECvGTBOTiyHe/V6aOY0120FUjaAGaapOnR7BImQdhqHv6yT2YQ==", - "dependencies": { - "abitype": "0.7.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.3.1", - "web3-utils": "^4.1.1", - "web3-validator": "^2.0.4" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-abi/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-abi/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-abi/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-abi/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-abi/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth-abi/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-accounts": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-4.1.1.tgz", - "integrity": "sha512-9JqhRi1YhO1hQOEmmBHgEGsME/B1FHMxpA/AK3vhpvQ8QeP6KbJW+cForTLfPpUbkmPxnRunG4PNNaETNlZfrA==", - "dependencies": { - "@ethereumjs/rlp": "^4.0.1", - "crc-32": "^1.2.2", - "ethereum-cryptography": "^2.0.0", - "web3-errors": "^1.1.4", - "web3-types": "^1.3.1", - "web3-utils": "^4.1.1", - "web3-validator": "^2.0.4" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-accounts/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-accounts/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-accounts/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-accounts/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-accounts/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth-accounts/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-contract": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-4.3.0.tgz", - "integrity": "sha512-4fzSklA65zUn6SthU3T3tbVJacfP8/wkJmCuvmPaf2ZTFdnhsF96G5IQtCRf0+wASb4yk0A6IBvXZfk1B4R4HA==", - "dependencies": { - "web3-core": "^4.3.2", - "web3-errors": "^1.1.4", - "web3-eth": "^4.5.0", - "web3-eth-abi": "^4.2.0", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.2", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-contract/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-contract/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-contract/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-contract/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-contract/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth-contract/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-ens": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-4.2.0.tgz", - "integrity": "sha512-qYj34te2UctoObt8rlEIY/t2MuTMiMiiHhO2JAHRGqSLCQ7b8DM3RpvkiiSB0N0ZyEn+CetZqJCTYb8DNKBS/g==", - "dependencies": { - "@adraffy/ens-normalize": "^1.8.8", - "web3-core": "^4.3.2", - "web3-errors": "^1.1.4", - "web3-eth": "^4.5.0", - "web3-eth-contract": "^4.3.0", - "web3-net": "^4.0.7", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.2", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-ens/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-ens/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-ens/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-ens/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-ens/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth-ens/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-iban": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-4.0.7.tgz", - "integrity": "sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ==", - "dependencies": { - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-iban/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-iban/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-iban/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-iban/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-iban/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth-iban/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-personal": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-4.0.8.tgz", - "integrity": "sha512-sXeyLKJ7ddQdMxz1BZkAwImjqh7OmKxhXoBNF3isDmD4QDpMIwv/t237S3q4Z0sZQamPa/pHebJRWVuvP8jZdw==", - "dependencies": { - "web3-core": "^4.3.0", - "web3-eth": "^4.3.1", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth-personal/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-personal/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-personal/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-personal/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth-personal/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth-personal/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-eth/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-eth/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-eth/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-net": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-4.0.7.tgz", - "integrity": "sha512-SzEaXFrBjY25iQGk5myaOfO9ZyfTwQEa4l4Ps4HDNVMibgZji3WPzpjq8zomVHMwi8bRp6VV7YS71eEsX7zLow==", - "dependencies": { - "web3-core": "^4.3.0", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-net/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-net/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-net/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-net/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-net/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-net/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-4.1.0.tgz", - "integrity": "sha512-6qRUGAhJfVQM41E5t+re5IHYmb5hSaLc02BE2MaRQsz2xKA6RjmHpOA5h/+ojJxEpI9NI2CrfDKOAgtJfoUJQg==", - "dependencies": { - "cross-fetch": "^4.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-http/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-http/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-http/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-http/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-http/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-providers-http/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ipc": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-4.0.7.tgz", - "integrity": "sha512-YbNqY4zUvIaK2MHr1lQFE53/8t/ejHtJchrWn9zVbFMGXlTsOAbNoIoZWROrg1v+hCBvT2c9z8xt7e/+uz5p1g==", - "optional": true, - "dependencies": { - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ipc/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "optional": true, - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ipc/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "optional": true, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ipc/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "optional": true, - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ipc/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "optional": true, - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ipc/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "optional": true, - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3-providers-ipc/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "optional": true, - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ws": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-4.0.7.tgz", - "integrity": "sha512-n4Dal9/rQWjS7d6LjyEPM2R458V8blRm0eLJupDEJOOIBhGYlxw5/4FthZZ/cqB7y/sLVi7K09DdYx2MeRtU5w==", - "dependencies": { - "@types/ws": "8.5.3", - "isomorphic-ws": "^5.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "ws": "^8.8.1" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/web3-providers-ws/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ws/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ws/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-providers-ws/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node_modules/uint8array-tools": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.7.tgz", + "integrity": "sha512-vrrNZJiusLWoFWBqz5Y5KMCgP9W9hnjZHzZiZRT8oNAkq3d5Z5Oe76jAvVVSRh4U8GGR90N2X1dWtrhvx6L8UQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" } }, - "node_modules/web3-providers-ws/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", + "node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" } }, - "node_modules/web3-providers-ws/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", - "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" - }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "peer": true, "engines": { - "node": ">=14", - "npm": ">=6.12.0" + "node": ">= 10.0.0" } }, - "node_modules/web3-providers-ws/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">= 0.8" } }, - "node_modules/web3-rpc-methods": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/web3-rpc-methods/-/web3-rpc-methods-1.2.0.tgz", - "integrity": "sha512-CWJ/g4I4WyYvLkf21wCZAehdhU/VjX/OAPHnqF5/FPDJlogOsOnGXHqi1Z5AP+ocdt395PNubd8jyMMJoYGSBA==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { - "web3-core": "^4.3.2", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.4" - }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" + "punycode": "^2.1.0" } }, - "node_modules/web3-types": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/web3-types/-/web3-types-1.5.0.tgz", - "integrity": "sha512-geWuMIeegQ8AedKAO6wO4G4j1gyQ1F/AyKLMw2vud4bsfZayyzWJgCMDZtjYMm5uo2a7i8j1W3/4QFmzlSy5cw==", - "engines": { - "node": ">=14", - "npm": ">=6.12.0" + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "devOptional": true, + "peer": true + }, + "node_modules/varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.1" } }, "node_modules/web3-utils": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", - "integrity": "sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "peer": true, "dependencies": { "@ethereumjs/util": "^8.1.0", "bn.js": "^5.2.1", @@ -9361,20 +8282,24 @@ } }, "node_modules/web3-utils/node_modules/@noble/curves": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", - "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "peer": true, "dependencies": { - "@noble/hashes": "1.3.1" + "@noble/hashes": "1.4.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/web3-utils/node_modules/@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "peer": true, "engines": { "node": ">= 16" }, @@ -9383,211 +8308,79 @@ } }, "node_modules/web3-utils/node_modules/ethereum-cryptography": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", - "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "peer": true, "dependencies": { - "@noble/curves": "1.1.0", - "@noble/hashes": "1.3.1", - "@scure/bip32": "1.3.1", - "@scure/bip39": "1.2.1" + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" } }, - "node_modules/web3-validator": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/web3-validator/-/web3-validator-2.0.5.tgz", - "integrity": "sha512-2gLOSW8XqEN5pw5jVUm20EB7A8SbQiekpAtiI0JBmCIV0a2rp97v8FgWY5E3UEqnw5WFfEqvcDVW92EyynDTyQ==", + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "peer": true, "dependencies": { - "ethereum-cryptography": "^2.0.0", - "util": "^0.12.5", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "zod": "^3.21.4" + "isexe": "^2.0.0" }, - "engines": { - "node": ">=14", - "npm": ">=6.12.0" + "bin": { + "which": "bin/which" } }, - "node_modules/web3-validator/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dependencies": { - "@noble/hashes": "1.3.3" + "string-width": "^4.0.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-validator/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-validator/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-validator/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3-validator/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/web3/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node": ">=8" } }, - "node_modules/web3/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "node_modules/widest-line/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3/node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3/node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/web3/node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" + "node": ">=8" } }, - "node_modules/web3/node_modules/web3-utils": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-4.2.2.tgz", - "integrity": "sha512-z+4owWcnoB4EH8yWIL1FBeyqe+sXwaGxUDtVTNPTMf2oB5C+paCToZUdCV5Bi+M543zZEzlzNTabOD+OWNc7NA==", + "node_modules/widest-line/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "ethereum-cryptography": "^2.0.0", - "eventemitter3": "^5.0.1", - "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", - "web3-validator": "^2.0.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=14", - "npm": ">=6.12.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "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": ">=8" } }, - "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "node_modules/wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", + "dev": true, + "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bs58check": "<3.0.0" } }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -9595,12 +8388,16 @@ "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "peer": true }, "node_modules/wordwrapjs": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "peer": true, "dependencies": { "reduce-flatten": "^2.0.0", "typical": "^5.2.0" @@ -9613,6 +8410,8 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -9638,36 +8437,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -9695,15 +8464,15 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -9714,6 +8483,16 @@ } } }, + "node_modules/xstream": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", + "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", + "dev": true, + "dependencies": { + "globalthis": "^1.0.1", + "symbol-observable": "^2.0.3" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -9722,11 +8501,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -9791,6 +8565,8 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "devOptional": true, + "peer": true, "engines": { "node": ">=6" } @@ -9805,14 +8581,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } } } } diff --git a/package.json b/package.json index 38f34e33..ce06656b 100644 --- a/package.json +++ b/package.json @@ -1,394 +1,49 @@ { "name": "exocore-contracts", "version": "1.0.0", - "description": "## Overview", - "main": "test.js", + "description": "The Exocore contracts repository contains a set of smart contracts deployed on both Exocore and the target client chains, which facilitate assets deposit and withdrawal, cross-chain communication, and restaking operations for native assets and liquid staking tokens (LSTs), ensuring secure interactions and efficient management of restaked assets.", + "main": "hardhat.config.js", "directories": { "doc": "docs", "lib": "lib", "test": "test" }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "deploy:utxo-gateway": "hardhat run script/hardhat/deploy-and-setup-utxogateway.script.js --network exocore_localnet" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@cosmjs/proto-signing": "^0.32.4", + "@cosmjs/stargate": "^0.32.2", + "@evmos/address-converter": "^0.1.9", + "@evmos/evmosjs": "github:evmos/evmosjs#main", + "@evmos/proto": "^0.2.1", + "@nomicfoundation/hardhat-foundry": "^1.1.3", + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "axios": "^1.7.9", + "bip39": "^3.1.0", + "bitcoinjs-lib": "^6.1.5", + "dotenv": "^16.4.7", + "ecpair": "^2.1.0", + "esm": "^3.2.25", + "ethereumjs-wallet": "^1.0.2", + "hardhat": "^2.22.17", + "mocha": "^10.2.0", + "solhint": "^5.0.1", + "tiny-secp256k1": "^2.2.3" + }, "dependencies": { - "@lodestar/api": "^1.23.0", "@openzeppelin/upgrades-core": "^1.40.0", - "abbrev": "^1.0.9", - "abstract-level": "^1.0.3", - "acorn": "^8.11.2", - "acorn-walk": "^8.3.1", - "address": "^1.2.2", - "adm-zip": "^0.4.16", - "aes-js": "^4.0.0-beta.5", - "agent-base": "^6.0.2", - "aggregate-error": "^3.1.0", - "ajv": "^8.12.0", - "amdefine": "^1.0.1", - "ansi-colors": "^4.1.3", - "ansi-escapes": "^4.3.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^3.2.1", - "antlr4ts": "^0.5.0-alpha.4", - "anymatch": "^3.1.3", - "arg": "^4.1.3", - "argparse": "^2.0.1", - "array-back": "^3.1.0", - "array-union": "^2.1.0", - "array-uniq": "^1.0.3", - "asap": "^2.0.6", - "assertion-error": "^1.1.0", - "astral-regex": "^2.0.0", - "async": "^1.5.2", - "asynckit": "^0.4.0", - "at-least-node": "^1.0.0", - "axios": "^1.6.2", - "balanced-match": "^1.0.2", - "base-x": "^3.0.9", - "base64-js": "^1.5.1", - "bech32": "^1.1.4", - "bigint-crypto-utils": "^3.3.0", - "binary-extensions": "^2.2.0", - "blakejs": "^1.2.1", - "bn.js": "^5.2.1", - "brace-expansion": "^1.1.11", - "braces": "^3.0.2", - "brorand": "^1.1.0", - "browser-level": "^1.0.1", - "browser-stdout": "^1.3.1", - "browserify-aes": "^1.2.0", - "bs58": "^4.0.1", - "bs58check": "^2.1.2", - "buffer": "^6.0.3", - "buffer-from": "^1.1.2", - "buffer-xor": "^1.0.3", - "bytes": "^3.1.2", - "call-bind": "^1.0.5", - "camelcase": "^6.3.0", - "case": "^1.6.3", - "caseless": "^0.12.0", - "catering": "^2.1.1", - "cbor": "^8.1.0", - "chai": "^4.3.10", - "chai-as-promised": "^7.1.1", - "chalk": "^2.4.2", - "charenc": "^0.0.2", - "check-error": "^1.0.3", - "chokidar": "^3.5.3", - "ci-info": "^2.0.0", - "cipher-base": "^1.0.4", - "classic-level": "^1.3.0", - "clean-stack": "^2.2.0", - "cli-table3": "^0.5.1", - "cliui": "^7.0.4", - "color-convert": "^1.9.3", - "color-name": "^1.1.3", - "colors": "^1.4.0", - "combined-stream": "^1.0.8", - "command-exists": "^1.2.9", - "command-line-args": "^5.2.1", - "command-line-usage": "^6.1.3", - "commander": "^3.0.2", - "concat-map": "^0.0.1", - "concat-stream": "^1.6.2", - "cookie": "^0.4.2", - "core-util-is": "^1.0.3", - "crc-32": "^1.2.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "create-require": "^1.1.1", - "crypt": "^0.0.2", - "death": "^1.1.0", - "debug": "^4.3.4", - "decamelize": "^4.0.0", - "decimal.js": "10.4.3", - "deep-eql": "^4.1.3", - "deep-extend": "^0.6.0", - "deep-is": "^0.1.4", - "define-data-property": "^1.1.1", - "delayed-stream": "^1.0.0", - "depd": "^2.0.0", - "detect-port": "^1.5.1", - "diff": "^5.0.0", - "difflib": "^0.2.4", - "dir-glob": "^3.0.1", - "dotenv": "^16.3.1", - "elliptic": "^6.5.4", - "emoji-regex": "^8.0.0", - "enquirer": "^2.4.1", - "env-paths": "^2.2.1", - "escalade": "^3.1.1", - "escape-string-regexp": "^1.0.5", - "escodegen": "^1.8.1", - "esprima": "^2.7.3", - "estraverse": "^1.9.3", - "esutils": "^2.0.3", - "eth-gas-reporter": "^0.2.27", - "ethereum-bloom-filters": "^1.0.10", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^7.1.5", "ethers": "^6.9.0", - "ethjs-unit": "^0.1.6", - "ethjs-util": "^0.1.6", - "evp_bytestokey": "^1.0.3", - "fast-deep-equal": "^3.1.3", - "fast-glob": "^3.3.2", - "fast-levenshtein": "^2.0.6", - "fastq": "^1.15.0", - "fill-range": "^7.0.1", - "find-replace": "^3.0.0", - "find-up": "^2.1.0", - "flat": "^5.0.2", - "follow-redirects": "^1.15.3", - "form-data": "^4.0.0", - "fp-ts": "^1.19.3", - "fs-extra": "^9.1.0", - "fs-readdir-recursive": "^1.1.0", - "fs.realpath": "^1.0.0", - "function-bind": "^1.1.2", - "functional-red-black-tree": "^1.0.1", - "get-caller-file": "^2.0.5", - "get-func-name": "^2.0.2", - "get-intrinsic": "^1.2.2", - "get-port": "^3.2.0", - "ghost-testrpc": "^0.0.2", - "glob": "^7.2.0", - "glob-parent": "^5.1.2", - "global-modules": "^2.0.0", - "global-prefix": "^3.0.0", - "globby": "^10.0.2", - "gopd": "^1.0.1", - "graceful-fs": "^4.2.11", - "handlebars": "^4.7.8", - "hardhat-gas-reporter": "^1.0.9", - "has-flag": "^3.0.0", - "has-property-descriptors": "^1.0.1", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hash-base": "^3.1.0", - "hash.js": "^1.1.7", - "hasown": "^2.0.0", - "he": "^1.2.0", - "heap": "^0.2.7", - "hmac-drbg": "^1.0.1", - "http-basic": "^8.1.3", - "http-errors": "^2.0.0", - "http-response-object": "^3.0.2", - "https-proxy-agent": "^5.0.1", - "iconv-lite": "^0.4.24", - "ieee754": "^1.2.1", - "ignore": "^5.3.0", - "immutable": "^4.3.4", - "indent-string": "^4.0.0", - "inflight": "^1.0.6", - "inherits": "^2.0.4", - "ini": "^1.3.8", - "interpret": "^1.4.0", - "io-ts": "^1.10.4", - "is-binary-path": "^2.1.0", - "is-buffer": "^2.0.5", - "is-extglob": "^2.1.1", - "is-fullwidth-code-point": "^2.0.0", - "is-glob": "^4.0.3", - "is-hex-prefixed": "^1.0.0", - "is-number": "^7.0.0", - "is-plain-obj": "^2.1.0", - "is-unicode-supported": "^0.1.0", - "isarray": "^1.0.0", - "isexe": "^2.0.0", - "js-sdsl": "^4.4.2", - "js-sha3": "^0.8.0", - "js-yaml": "^4.1.0", - "json-bigint": "^1.0.0", - "json-schema-traverse": "^1.0.0", - "jsonfile": "^6.1.0", - "jsonschema": "^1.4.1", - "keccak": "^3.0.4", - "kind-of": "^6.0.3", - "klaw": "^1.3.1", - "level": "^8.0.0", - "level-supports": "^4.0.1", - "level-transcoder": "^1.0.1", - "levn": "^0.3.0", - "locate-path": "^2.0.0", - "lodash": "^4.17.21", - "lodash.camelcase": "^4.3.0", - "lodash.clonedeep": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.truncate": "^4.4.2", - "log-symbols": "^4.1.0", - "loupe": "^2.3.7", - "lru_map": "^0.3.3", - "lru-cache": "^5.1.1", - "make-error": "^1.3.6", - "markdown-table": "^1.1.3", - "mcl-wasm": "^0.7.9", - "md5.js": "^1.3.5", - "memory-level": "^1.0.0", - "memorystream": "^0.3.1", - "merge2": "^1.4.1", - "micro-ftch": "^0.3.1", - "micromatch": "^4.0.5", - "mime-db": "^1.52.0", - "mime-types": "^2.1.35", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1", - "minimatch": "^3.1.2", - "minimist": "^1.2.8", - "mkdirp": "^0.5.6", - "mnemonist": "^0.38.5", - "module-error": "^1.0.2", - "ms": "^2.1.2", - "nanoid": "^3.3.3", - "napi-macros": "^2.2.2", - "neo-async": "^2.6.2", - "node-addon-api": "^2.0.2", - "node-emoji": "^1.11.0", - "node-gyp-build": "^4.7.1", - "nofilter": "^3.1.0", - "nopt": "^3.0.6", - "normalize-path": "^3.0.0", - "number-to-bn": "^1.7.0", - "object-assign": "^4.1.1", - "object-inspect": "^1.13.1", - "obliterator": "^2.0.4", - "once": "^1.4.0", - "optionator": "^0.8.3", - "ordinal": "^1.0.3", - "os-tmpdir": "^1.0.2", - "p-limit": "^1.3.0", - "p-locate": "^2.0.0", - "p-map": "^4.0.0", - "p-try": "^1.0.0", - "parse-cache-control": "^1.0.1", - "path-exists": "^3.0.0", - "path-is-absolute": "^1.0.1", - "path-parse": "^1.0.7", - "path-type": "^4.0.0", - "pathval": "^1.1.1", - "pbkdf2": "^3.1.2", - "picomatch": "^2.3.1", - "pify": "^4.0.1", - "prelude-ls": "^1.1.2", - "prettier": "^2.8.8", - "process-nextick-args": "^2.0.1", - "promise": "^8.3.0", - "proxy-from-env": "^1.1.0", - "punycode": "^2.3.1", - "qs": "^6.11.2", - "queue-microtask": "^1.2.3", - "randombytes": "^2.1.0", - "raw-body": "^2.5.2", - "readable-stream": "^3.6.2", - "readdirp": "^3.6.0", - "rechoir": "^0.6.2", - "recursive-readdir": "^2.2.3", - "reduce-flatten": "^2.0.0", - "req-cwd": "^2.0.0", - "req-from": "^2.0.0", - "require-directory": "^2.1.1", - "require-from-string": "^2.0.2", - "resolve": "^1.17.0", - "resolve-from": "^3.0.0", - "reusify": "^1.0.4", - "rimraf": "^2.7.1", - "ripemd160": "^2.0.2", - "rlp": "^2.2.7", - "run-parallel": "^1.2.0", - "run-parallel-limit": "^1.1.0", - "rustbn.js": "^0.2.0", - "safe-buffer": "^5.2.1", - "safer-buffer": "^2.1.2", - "sc-istanbul": "^0.4.6", - "scrypt-js": "^3.0.1", - "secp256k1": "^4.0.3", - "semver": "^6.3.1", - "serialize-javascript": "^6.0.0", - "set-function-length": "^1.1.1", - "setimmediate": "^1.0.5", - "setprototypeof": "^1.2.0", - "sha.js": "^2.4.11", - "sha1": "^1.1.1", - "shelljs": "^0.8.5", - "side-channel": "^1.0.4", - "slash": "^3.0.0", - "slice-ansi": "^4.0.0", - "solc": "^0.7.3", - "solidity-coverage": "^0.8.5", - "source-map": "^0.2.0", - "source-map-support": "^0.5.21", - "sprintf-js": "^1.0.3", - "stacktrace-parser": "^0.1.10", - "statuses": "^2.0.1", - "string_decoder": "^1.3.0", - "string-format": "^2.0.0", - "string-width": "^2.1.1", - "strip-ansi": "^6.0.1", - "strip-hex-prefix": "^1.0.0", - "strip-json-comments": "^3.1.1", - "supports-color": "^5.5.0", - "sync-request": "^6.1.0", - "sync-rpc": "^1.3.6", - "table": "^6.8.1", - "table-layout": "^1.0.2", - "then-request": "^6.0.2", - "tmp": "^0.0.33", - "to-regex-range": "^5.0.1", - "toidentifier": "^1.0.1", - "ts-command-line-args": "^2.5.1", - "ts-essentials": "^7.0.3", - "ts-node": "^10.9.2", - "tslib": "^2.4.0", - "tsort": "^0.0.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1", - "type-check": "^0.3.2", - "type-detect": "^4.0.8", - "type-fest": "^0.21.3", - "typechain": "^8.3.2", - "typedarray": "^0.0.6", - "typescript": "^5.3.3", - "typical": "^4.0.0", - "uglify-js": "^3.17.4", - "undici": "^5.28.2", - "undici-types": "^5.26.5", - "universalify": "^2.0.1", - "unpipe": "^1.0.0", - "uri-js": "^4.4.1", - "utf8": "^3.0.0", - "util-deprecate": "^1.0.2", - "uuid": "^8.3.2", - "v8-compile-cache-lib": "^3.0.1", - "web3": "^4.6.0", - "web3-utils": "^1.10.3", - "which": "^1.3.1", - "word-wrap": "^1.2.5", - "wordwrap": "^1.0.0", - "wordwrapjs": "^4.0.1", - "workerpool": "^6.2.1", - "wrap-ansi": "^7.0.0", - "wrappy": "^1.0.2", - "ws": "^8.5.0", - "y18n": "^5.0.8", - "yallist": "^3.1.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.4", - "yargs-unparser": "^2.0.0", - "yn": "^3.1.1", - "yocto-queue": "^0.1.0" + "hardhat-gas-reporter": "^1.0.9" }, "optionalDependencies": { "fsevents": "^2.3.3" }, - "devDependencies": { - "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "hardhat": "^2.19.3", - "mocha": "^10.2.0", - "solhint": "^5.0.1" - }, - "scripts": { - "test": "mocha" - }, - "keywords": [], - "author": "", - "license": "ISC" + "resolutions": { + "@buf/cosmos_cosmos-sdk.bufbuild_es": "1.0.0-20230125164018-54d184078b88.1" + } } diff --git a/remappings.txt b/remappings.txt index 2f83cab2..29550c18 100644 --- a/remappings.txt +++ b/remappings.txt @@ -3,10 +3,8 @@ forge-std/=lib/forge-std/src/ @layerzero-contracts/=lib/solidity-examples/contracts/ @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ @openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ -@layerzero-v2/=lib/LayerZero-v2/ @layerzerolabs/lz-evm-protocol-v2=lib/LayerZero-v2/protocol/ @layerzerolabs/lz-evm-oapp-v2=lib/LayerZero-v2/oapp/ -@layerzerolabs/lz-evm-oapp-v2=lib/LayerZero-v2/oapp/ @layerzerolabs/lz-evm-messagelib-v2=lib/LayerZero-v2/messagelib/ @beacon-oracle=lib/eigenlayer-beacon-oracle/ solidity-bytes-utils/=lib/solidity-bytes-utils/ diff --git a/script/10_DeployExocoreGatewayOnly.s.sol b/script/10_DeployExocoreGatewayOnly.s.sol index 2fe48330..cdd43fdd 100644 --- a/script/10_DeployExocoreGatewayOnly.s.sol +++ b/script/10_DeployExocoreGatewayOnly.s.sol @@ -1,6 +1,6 @@ pragma solidity ^0.8.19; -import {ILayerZeroEndpointV2} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import {ILayerZeroEndpointV2} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; @@ -16,7 +16,7 @@ contract DeployExocoreGatewayOnly is BaseScript { // load keys super.setUp(); // load contracts - string memory prerequisites = vm.readFile("script/prerequisiteContracts.json"); + string memory prerequisites = vm.readFile("script/deployments/prerequisiteContracts.json"); exocoreLzEndpoint = ILayerZeroEndpointV2(stdJson.readAddress(prerequisites, ".exocore.lzEndpoint")); require(address(exocoreLzEndpoint) != address(0), "exocore l0 endpoint should not be empty"); // fork @@ -55,7 +55,7 @@ contract DeployExocoreGatewayOnly is BaseScript { string memory deployedContracts = "deployedContracts"; string memory finalJson = vm.serializeString(deployedContracts, "exocore", exocoreContractsOutput); - vm.writeJson(finalJson, "script/deployedExocoreGatewayOnly.json"); + vm.writeJson(finalJson, "script/deployments/deployedExocoreGatewayOnly.json"); } } diff --git a/script/11_SetPeers.s.sol b/script/11_SetPeers.s.sol index 9ddce3d8..0b25bbf9 100644 --- a/script/11_SetPeers.s.sol +++ b/script/11_SetPeers.s.sol @@ -7,7 +7,7 @@ import {Action, GatewayStorage} from "../src/storage/GatewayStorage.sol"; import {BaseScript} from "./BaseScript.sol"; import "forge-std/Script.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; contract SetPeersAndUpgrade is BaseScript { @@ -20,7 +20,7 @@ contract SetPeersAndUpgrade is BaseScript { // load keys super.setUp(); // load contracts - string memory deployed = vm.readFile("script/deployedBootstrapOnly.json"); + string memory deployed = vm.readFile("script/deployments/deployedBootstrapOnly.json"); bootstrapAddr = stdJson.readAddress(deployed, ".clientChain.bootstrap"); require(address(bootstrapAddr) != address(0), "bootstrap address should not be empty"); deployed = vm.readFile("script/deployedExocoreGatewayOnly.json"); diff --git a/script/12_RedeployClientChainGateway.s.sol b/script/12_RedeployClientChainGateway.s.sol index 423dd4bb..80c61e56 100644 --- a/script/12_RedeployClientChainGateway.s.sol +++ b/script/12_RedeployClientChainGateway.s.sol @@ -19,7 +19,7 @@ import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import {BaseScript} from "./BaseScript.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import {ILayerZeroEndpointV2} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import {ILayerZeroEndpointV2} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -31,7 +31,7 @@ contract RedeployClientChainGateway is BaseScript { // load keys super.setUp(); // load contracts - string memory prerequisiteContracts = vm.readFile("script/deployedBootstrapOnly.json"); + string memory prerequisiteContracts = vm.readFile("script/deployments/deployedBootstrapOnly.json"); clientChainLzEndpoint = ILayerZeroEndpointV2(stdJson.readAddress(prerequisiteContracts, ".clientChain.lzEndpoint")); require(address(clientChainLzEndpoint) != address(0), "client chain l0 endpoint should not be empty"); @@ -86,7 +86,7 @@ contract RedeployClientChainGateway is BaseScript { string memory deployedContracts = "deployedContracts"; string memory finalJson = vm.serializeString(deployedContracts, "clientChain", clientChainContractsOutput); - vm.writeJson(finalJson, "script/redeployClientChainGateway.json"); + vm.writeJson(finalJson, "script/deployments/redeployClientChainGateway.json"); } } diff --git a/script/13_DepositValidator.s.sol b/script/13_DepositValidator.s.sol index 7048ba8e..9cfd35e2 100644 --- a/script/13_DepositValidator.s.sol +++ b/script/13_DepositValidator.s.sol @@ -7,8 +7,8 @@ import "../src/interfaces/IVault.sol"; import {Action, GatewayStorage} from "../src/storage/GatewayStorage.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -35,8 +35,8 @@ contract DepositScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory validatorInfo = vm.readFile("script/validatorProof_staker1_testnetV6.json"); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory validatorInfo = vm.readFile("script/data/validatorProof_staker1_testnetV6.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); clientGateway = IClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); diff --git a/script/14_CorrectBootstrapErrors.s.sol b/script/14_CorrectBootstrapErrors.s.sol index 27666895..1a8e3262 100644 --- a/script/14_CorrectBootstrapErrors.s.sol +++ b/script/14_CorrectBootstrapErrors.s.sol @@ -15,7 +15,7 @@ import {Vault} from "../src/core/Vault.sol"; import {ICustomProxyAdmin} from "../src/interfaces/ICustomProxyAdmin.sol"; import {BaseScript} from "./BaseScript.sol"; -import {ILayerZeroEndpointV2} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import {ILayerZeroEndpointV2} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -37,7 +37,7 @@ contract CorrectBootstrapErrors is BaseScript { // load keys super.setUp(); // load contracts - string memory prerequisiteContracts = vm.readFile("script/prerequisiteContracts.json"); + string memory prerequisiteContracts = vm.readFile("script/deployments/prerequisiteContracts.json"); clientChainLzEndpoint = ILayerZeroEndpointV2(stdJson.readAddress(prerequisiteContracts, ".clientChain.lzEndpoint")); require(address(clientChainLzEndpoint) != address(0), "Client chain endpoint not found"); @@ -56,7 +56,7 @@ contract CorrectBootstrapErrors is BaseScript { wstETH = stdJson.readAddress(prerequisiteContracts, ".clientChain.wstETH"); require(wstETH != address(0), "wstETH not found"); - string memory deployed = vm.readFile("script/deployedBootstrapOnly.json"); + string memory deployed = vm.readFile("script/deployments/deployedBootstrapOnly.json"); proxyAddress = stdJson.readAddress(deployed, ".clientChain.bootstrap"); require(address(proxyAddress) != address(0), "bootstrap address should not be empty"); @@ -136,7 +136,7 @@ contract CorrectBootstrapErrors is BaseScript { string memory deployedContracts = "deployedContracts"; string memory finalJson = vm.serializeString(deployedContracts, "clientChain", clientChainContractsOutput); - vm.writeJson(finalJson, "script/correctBootstrapErrors.json"); + vm.writeJson(finalJson, "script/deployments/correctBootstrapErrors.json"); } } diff --git a/script/15_DeploySafeMulstisigWallet.s.sol b/script/15_DeploySafeMulstisigWallet.s.sol index a15b9a4c..e2127a17 100644 --- a/script/15_DeploySafeMulstisigWallet.s.sol +++ b/script/15_DeploySafeMulstisigWallet.s.sol @@ -24,7 +24,7 @@ contract CreateMultisigScript is BaseScript { vm.startBroadcast(deployer.privateKey); // Read deployed Safe contracts from JSON file - string memory json = vm.readFile("script/safe_contracts_on_exocore.json"); + string memory json = vm.readFile("script/deployments/safe_contracts_on_exocore.json"); address proxyFactoryAddress = json.readAddress(".GnosisSafeProxyFactory"); address safeSingletonAddress = json.readAddress(".GnosisSafeL2"); diff --git a/script/16_UpgradeExoCapsule.s.sol b/script/16_UpgradeExoCapsule.s.sol index 6ebf619e..fe29c0fa 100644 --- a/script/16_UpgradeExoCapsule.s.sol +++ b/script/16_UpgradeExoCapsule.s.sol @@ -12,7 +12,7 @@ contract UpgradeExoCapsuleScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); capsuleBeaconContract = UpgradeableBeacon((stdJson.readAddress(deployedContracts, ".clientChain.capsuleBeacon"))); diff --git a/script/17_WithdrawalValidator.s.sol b/script/17_WithdrawalValidator.s.sol index 68cd7d7e..a524c15e 100644 --- a/script/17_WithdrawalValidator.s.sol +++ b/script/17_WithdrawalValidator.s.sol @@ -9,8 +9,8 @@ import "../src/interfaces/IVault.sol"; import "../src/storage/GatewayStorage.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -42,7 +42,7 @@ contract WithdrawalValidatorScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); clientGateway = IClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); @@ -95,14 +95,14 @@ contract WithdrawalValidatorScript is BaseScript { } function _loadValidatorContainer() internal { - string memory validatorInfo = vm.readFile("script/withdrawalProof_fullwithdraw_2495260_2472449.json"); + string memory validatorInfo = vm.readFile("script/data/withdrawalProof_fullwithdraw_2495260_2472449.json"); validatorContainer = stdJson.readBytes32Array(validatorInfo, ".validatorContainer"); require(validatorContainer.length > 0, "validator container should not be empty"); } function _loadValidatorProof() internal { - string memory validatorInfo = vm.readFile("script/withdrawalProof_fullwithdraw_2495260_2472449.json"); + string memory validatorInfo = vm.readFile("script/data/withdrawalProof_fullwithdraw_2495260_2472449.json"); uint256 slot = stdJson.readUint(validatorInfo, ".slot"); validatorProof.beaconBlockTimestamp = GENESIS_BLOCK_TIMESTAMP + SECONDS_PER_SLOT * slot; @@ -118,14 +118,14 @@ contract WithdrawalValidatorScript is BaseScript { } function _loadWithdrawalContainer() internal { - string memory withdrawalInfo = vm.readFile("script/withdrawalProof_fullwithdraw_2495260_2472449.json"); + string memory withdrawalInfo = vm.readFile("script/data/withdrawalProof_fullwithdraw_2495260_2472449.json"); withdrawalContainer = stdJson.readBytes32Array(withdrawalInfo, ".withdrawalContainer"); require(withdrawalContainer.length > 0, "withdrawal container should not be empty"); } function _loadWithdrawalProof() internal { - string memory withdrawalInfo = vm.readFile("script/withdrawalProof_fullwithdraw_2495260_2472449.json"); + string memory withdrawalInfo = vm.readFile("script/data/withdrawalProof_fullwithdraw_2495260_2472449.json"); withdrawalProof.withdrawalContainerRootProof = stdJson.readBytes32Array(withdrawalInfo, ".withdrawalContainerProof"); diff --git a/script/18_SimulateReceive.s.sol b/script/18_SimulateReceive.s.sol index 65fd03be..2268a4ff 100644 --- a/script/18_SimulateReceive.s.sol +++ b/script/18_SimulateReceive.s.sol @@ -11,7 +11,7 @@ import {Script, console} from "forge-std/Script.sol"; import {StdCheats} from "forge-std/StdCheats.sol"; import "forge-std/StdJson.sol"; -import {IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; +import {IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; import {Origin} from "../src/lzApp/OAppReceiverUpgradeable.sol"; diff --git a/script/19_DeployFaucet.s.sol b/script/19_DeployFaucet.s.sol index 280823bb..86e634e6 100644 --- a/script/19_DeployFaucet.s.sol +++ b/script/19_DeployFaucet.s.sol @@ -16,7 +16,7 @@ contract DeployScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory prerequisites = vm.readFile("script/prerequisiteContracts.json"); + string memory prerequisites = vm.readFile("script/deployments/prerequisiteContracts.json"); tokenAddr = stdJson.readAddress(prerequisites, ".clientChain.erc20Token"); require(tokenAddr != address(0), "token address should not be empty"); diff --git a/script/1_Prerequisites.s.sol b/script/1_Prerequisites.s.sol index c29eada8..c749be21 100644 --- a/script/1_Prerequisites.s.sol +++ b/script/1_Prerequisites.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import "./BaseScript.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -73,7 +73,7 @@ contract PrerequisitesScript is BaseScript { vm.serializeString(deployedContracts, "clientChain", clientChainContractsOutput); string memory finalJson = vm.serializeString(deployedContracts, "exocore", exocoreContractsOutput); - vm.writeJson(finalJson, "script/prerequisiteContracts.json"); + vm.writeJson(finalJson, "script/deployments/prerequisiteContracts.json"); } } diff --git a/script/2_DeployBoth.s.sol b/script/2_DeployBoth.s.sol index d17b671c..dd51c953 100644 --- a/script/2_DeployBoth.s.sol +++ b/script/2_DeployBoth.s.sol @@ -14,7 +14,7 @@ import {ExocoreGatewayMock} from "../test/mocks/ExocoreGatewayMock.sol"; import {BootstrapStorage} from "../src/storage/BootstrapStorage.sol"; import {BaseScript} from "./BaseScript.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; @@ -25,7 +25,7 @@ contract DeployScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory prerequisites = vm.readFile("script/prerequisiteContracts.json"); + string memory prerequisites = vm.readFile("script/deployments/prerequisiteContracts.json"); clientChainLzEndpoint = ILayerZeroEndpointV2(stdJson.readAddress(prerequisites, ".clientChain.lzEndpoint")); require(address(clientChainLzEndpoint) != address(0), "client chain l0 endpoint should not be empty"); diff --git a/script/3_Setup.s.sol b/script/3_Setup.s.sol index 84ca88e7..d6f4ceeb 100644 --- a/script/3_Setup.s.sol +++ b/script/3_Setup.s.sol @@ -9,8 +9,8 @@ import "../src/interfaces/IVault.sol"; import {NonShortCircuitEndpointV2Mock} from "../test/mocks/NonShortCircuitEndpointV2Mock.sol"; import {BaseScript} from "./BaseScript.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -21,7 +21,7 @@ contract SetupScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); clientGateway = IClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); diff --git a/script/4_Deposit.s.sol b/script/4_Deposit.s.sol index e3c81492..3981b312 100644 --- a/script/4_Deposit.s.sol +++ b/script/4_Deposit.s.sol @@ -7,8 +7,8 @@ import "../src/interfaces/IVault.sol"; import {Action, GatewayStorage} from "../src/storage/GatewayStorage.sol"; import {BaseScript} from "./BaseScript.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -20,7 +20,7 @@ contract DepositScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); clientGateway = IClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); diff --git a/script/5_Withdraw.s.sol b/script/5_Withdraw.s.sol index 92011269..f7f2925d 100644 --- a/script/5_Withdraw.s.sol +++ b/script/5_Withdraw.s.sol @@ -8,8 +8,8 @@ import "../src/interfaces/IVault.sol"; import {Action, GatewayStorage} from "../src/storage/GatewayStorage.sol"; import {BaseScript} from "./BaseScript.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -21,7 +21,7 @@ contract DepositScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); clientGateway = IClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); diff --git a/script/6_CreateExoCapsule.s.sol b/script/6_CreateExoCapsule.s.sol index 0b1b05e4..4253efa7 100644 --- a/script/6_CreateExoCapsule.s.sol +++ b/script/6_CreateExoCapsule.s.sol @@ -8,8 +8,8 @@ import "../src/interfaces/IVault.sol"; import "../src/storage/GatewayStorage.sol"; import {BaseScript} from "./BaseScript.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -23,7 +23,7 @@ contract DepositScript is BaseScript { function setUp() public virtual override { super.setUp(); - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedContracts.json"); clientGateway = IClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); @@ -53,7 +53,7 @@ contract DepositScript is BaseScript { vm.serializeAddress(capsulesJson, "owner", depositor.addr); string memory capsulesOutput = vm.serializeAddress(capsulesJson, "capsule", capsule); - vm.writeJson(capsulesOutput, "script/capsule.json"); + vm.writeJson(capsulesOutput, "script/deployments/capsule.json"); } } diff --git a/script/7_DeployBootstrap.s.sol b/script/7_DeployBootstrap.s.sol index 22d5b2e2..3fe9c5ab 100644 --- a/script/7_DeployBootstrap.s.sol +++ b/script/7_DeployBootstrap.s.sol @@ -14,7 +14,7 @@ import "../src/utils/BeaconProxyBytecode.sol"; import {CustomProxyAdmin} from "../src/utils/CustomProxyAdmin.sol"; import {BaseScript} from "./BaseScript.sol"; -import {ILayerZeroEndpointV2} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import {ILayerZeroEndpointV2} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; @@ -29,7 +29,7 @@ contract DeployBootstrapOnly is BaseScript { // load keys super.setUp(); // load contracts - string memory prerequisiteContracts = vm.readFile("script/prerequisiteContracts.json"); + string memory prerequisiteContracts = vm.readFile("script/deployments/prerequisiteContracts.json"); clientChainLzEndpoint = ILayerZeroEndpointV2(stdJson.readAddress(prerequisiteContracts, ".clientChain.lzEndpoint")); require(address(clientChainLzEndpoint) != address(0), "Client chain endpoint not found"); @@ -147,7 +147,7 @@ contract DeployBootstrapOnly is BaseScript { string memory deployedContracts = "deployedContracts"; string memory finalJson = vm.serializeString(deployedContracts, "clientChain", clientChainContractsOutput); - vm.writeJson(finalJson, "script/deployedBootstrapOnly.json"); + vm.writeJson(finalJson, "script/deployments/deployedBootstrapOnly.json"); } } diff --git a/script/8_RegisterValidatorsAndDelegate.s.sol b/script/8_RegisterValidatorsAndDelegate.s.sol index eecddce8..4bea4e01 100644 --- a/script/8_RegisterValidatorsAndDelegate.s.sol +++ b/script/8_RegisterValidatorsAndDelegate.s.sol @@ -48,7 +48,7 @@ contract RegisterValidatorsAndDelegate is Script { "Validator registration data length mismatch" ); - string memory deployedContracts = vm.readFile("script/deployedBootstrapOnly.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedBootstrapOnly.json"); bootstrapAddr = stdJson.readAddress(deployedContracts, ".clientChain.bootstrap"); require(bootstrapAddr != address(0), "Bootstrap address should not be empty"); tokenAddr = stdJson.readAddress(deployedContracts, ".clientChain.erc20Token"); diff --git a/script/9_ExtendBootstrapTime.s.sol b/script/9_ExtendBootstrapTime.s.sol index 71e46658..ee122dd7 100644 --- a/script/9_ExtendBootstrapTime.s.sol +++ b/script/9_ExtendBootstrapTime.s.sol @@ -13,7 +13,7 @@ contract SetBootstrapTime is BaseScript { // load keys super.setUp(); // load contracts - string memory deployedContracts = vm.readFile("script/deployedBootstrapOnly.json"); + string memory deployedContracts = vm.readFile("script/deployments/deployedBootstrapOnly.json"); bootstrapAddr = stdJson.readAddress(deployedContracts, ".clientChain.bootstrap"); clientChain = vm.createSelectFork(clientChainRPCURL); diff --git a/script/BaseScript.sol b/script/BaseScript.sol index 24ac9aa1..5eb64bbf 100644 --- a/script/BaseScript.sol +++ b/script/BaseScript.sol @@ -14,7 +14,7 @@ import "../src/interfaces/precompiles/IDelegation.sol"; import "../src/interfaces/precompiles/IReward.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {IBeacon} from "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import {ERC20PresetFixedSupply, IERC20} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; diff --git a/script/TestPrecompileErrorFixed.s.sol b/script/TestPrecompileErrorFixed.s.sol deleted file mode 100644 index a119899b..00000000 --- a/script/TestPrecompileErrorFixed.s.sol +++ /dev/null @@ -1,119 +0,0 @@ -pragma solidity ^0.8.19; - -import "../src/interfaces/IClientChainGateway.sol"; - -import "../src/interfaces/IExocoreGateway.sol"; -import "../src/interfaces/IVault.sol"; - -import "../src/interfaces/precompiles/IAssets.sol"; - -import "../src/interfaces/precompiles/IDelegation.sol"; -import "../src/interfaces/precompiles/IReward.sol"; -import {Action, GatewayStorage} from "../src/storage/GatewayStorage.sol"; - -import {NonShortCircuitEndpointV2Mock} from "../test/mocks/NonShortCircuitEndpointV2Mock.sol"; -import {BaseScript} from "./BaseScript.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; -import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; -import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; -import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; -import "forge-std/Script.sol"; - -import "src/core/ClientChainGateway.sol"; -import "src/core/ExocoreGateway.sol"; - -contract DepositScript is BaseScript { - - using AddressCast for address; - - uint256 constant TEST_DEPOSIT_AMOUNT = 100; - uint256 constant TEST_WITHDRAWAL_AMOUNT = 123; - - function setUp() public virtual override { - super.setUp(); - - exocoreRPCURL = vm.envString("EXOCORE_LOCAL_RPC"); - - restakeToken = ERC20PresetFixedSupply(erc20TokenAddress); - clientChainLzEndpoint = NonShortCircuitEndpointV2Mock(address(0xa)); - clientGateway = ClientChainGateway(payable(address(0xb))); - - string memory testContracts = vm.readFile("script/testContracts.json"); - - exocoreGateway = IExocoreGateway(payable(stdJson.readAddress(testContracts, ".exocore.exocoreGateway"))); - require(address(exocoreGateway) != address(0), "exocoreGateway address should not be empty"); - - exocoreLzEndpoint = ILayerZeroEndpointV2(stdJson.readAddress(testContracts, ".exocore.lzEndpoint")); - require(address(exocoreLzEndpoint) != address(0), "exocoreLzEndpoint address should not be empty"); - - exocore = vm.createSelectFork(exocoreRPCURL); - vm.startBroadcast(exocoreGenesis.privateKey); - if (depositor.addr.balance < 1 ether) { - (bool sent,) = depositor.addr.call{value: 2 ether}(""); - require(sent, "Failed to send Ether"); - } - if (address(exocoreGateway).balance < 1 ether) { - (bool sent,) = address(exocoreGateway).call{value: 2 ether}(""); - require(sent, "Failed to send Ether"); - } - vm.stopBroadcast(); - - // bind precompile mock contracts code to constant precompile address so that local simulation could pass - // Ensure that the address constants used here (ASSETS_PRECOMPILE_ADDRESS, etc.) are designated for testing and - // do not conflict with production addresses. - bytes memory AssetsMockCode = vm.getDeployedCode("AssetsMock.sol"); - vm.etch(ASSETS_PRECOMPILE_ADDRESS, AssetsMockCode); - - bytes memory DelegationMockCode = vm.getDeployedCode("DelegationMock.sol"); - vm.etch(DELEGATION_PRECOMPILE_ADDRESS, DelegationMockCode); - - bytes memory WithdrawRewardMockCode = vm.getDeployedCode("RewardMock.sol"); - vm.etch(REWARD_PRECOMPILE_ADDRESS, WithdrawRewardMockCode); - } - - function run() public { - bytes memory depositMsg = abi.encodePacked( - Action.REQUEST_DEPOSIT_LST, - abi.encodePacked(bytes32(bytes20(address(restakeToken)))), - abi.encodePacked(bytes32(bytes20(depositor.addr))), - uint256(TEST_DEPOSIT_AMOUNT) - ); - - vm.selectFork(exocore); - vm.startBroadcast(depositor.privateKey); - uint64 nonce = exocoreGateway.nextNonce(clientChainId, address(clientGateway).toBytes32()); - exocoreLzEndpoint.lzReceive( - Origin(clientChainId, address(clientGateway).toBytes32(), nonce), - address(exocoreGateway), - GUID.generate( - nonce, clientChainId, address(clientGateway), exocoreChainId, address(exocoreGateway).toBytes32() - ), - depositMsg, - bytes("") - ); - vm.stopBroadcast(); - - bytes memory withdrawMsg = abi.encodePacked( - Action.REQUEST_WITHDRAW_LST, - abi.encodePacked(bytes32(bytes20(address(restakeToken)))), - abi.encodePacked(bytes32(bytes20(depositor.addr))), - uint256(TEST_WITHDRAWAL_AMOUNT) - ); - - vm.selectFork(exocore); - vm.startBroadcast(depositor.privateKey); - nonce = exocoreGateway.nextNonce(clientChainId, address(clientGateway).toBytes32()); - exocoreLzEndpoint.lzReceive( - Origin(clientChainId, address(clientGateway).toBytes32(), nonce), - address(exocoreGateway), - GUID.generate( - nonce, clientChainId, address(clientGateway), exocoreChainId, address(exocoreGateway).toBytes32() - ), - withdrawMsg, - bytes("") - ); - vm.stopBroadcast(); - } - -} diff --git a/script/TestPrecompileErrorFixed_Deploy.s.sol b/script/TestPrecompileErrorFixed_Deploy.s.sol deleted file mode 100644 index 83bbaca4..00000000 --- a/script/TestPrecompileErrorFixed_Deploy.s.sol +++ /dev/null @@ -1,86 +0,0 @@ -pragma solidity ^0.8.19; - -import "../src/interfaces/IClientChainGateway.sol"; - -import "../src/interfaces/IExocoreGateway.sol"; -import "../src/interfaces/IVault.sol"; - -import {Action, GatewayStorage} from "../src/storage/GatewayStorage.sol"; - -import {NonShortCircuitEndpointV2Mock} from "../test/mocks/NonShortCircuitEndpointV2Mock.sol"; -import {BaseScript} from "./BaseScript.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; -import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; -import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; -import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; -import "forge-std/Script.sol"; - -import "src/core/ClientChainGateway.sol"; -import "src/core/ExocoreGateway.sol"; - -contract DepositScript is BaseScript { - - using AddressCast for address; - - uint256 constant WITHDRAWAL_AMOUNT = 123; - - function setUp() public virtual override { - super.setUp(); - - exocoreRPCURL = vm.envString("EXOCORE_LOCAL_RPC"); - - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); - - restakeToken = ERC20PresetFixedSupply(stdJson.readAddress(deployedContracts, ".clientChain.erc20Token")); - require(address(restakeToken) != address(0), "restakeToken address should not be empty"); - - exocore = vm.createSelectFork(exocoreRPCURL); - vm.startBroadcast(exocoreGenesis.privateKey); - if (deployer.addr.balance < 1 ether) { - (bool sent,) = deployer.addr.call{value: 1 ether}(""); - require(sent, "Failed to send Ether"); - } - vm.stopBroadcast(); - } - - function run() public { - _deploy(); - - string memory testContracts = "testContracts"; - string memory exocoreContracts = "exocoreContracts"; - - vm.serializeAddress(exocoreContracts, "lzEndpoint", address(exocoreLzEndpoint)); - string memory exocoreContractsOutput = - vm.serializeAddress(exocoreContracts, "exocoreGateway", address(exocoreGateway)); - - string memory finalJson = vm.serializeString(testContracts, "exocore", exocoreContractsOutput); - - vm.writeJson(finalJson, "script/testContracts.json"); - } - - function _deploy() internal { - clientChainLzEndpoint = NonShortCircuitEndpointV2Mock(address(0xa)); - clientGateway = ClientChainGateway(payable(address(0xb))); - - vm.selectFork(exocore); - - vm.startBroadcast(deployer.privateKey); - exocoreLzEndpoint = new NonShortCircuitEndpointV2Mock(exocoreChainId, exocoreValidatorSet.addr); - ProxyAdmin proxyAdmin = new ProxyAdmin(); - ExocoreGateway exocoreGatewayLogic = new ExocoreGateway(address(exocoreLzEndpoint)); - exocoreGateway = ExocoreGateway( - payable(address(new TransparentUpgradeableProxy(address(exocoreGatewayLogic), address(proxyAdmin), ""))) - ); - ExocoreGateway(payable(address(exocoreGateway))).initialize(payable(exocoreValidatorSet.addr)); - vm.stopBroadcast(); - - vm.startBroadcast(exocoreValidatorSet.privateKey); - exocoreGateway.setPeer(clientChainId, address(clientGateway).toBytes32()); - NonShortCircuitEndpointV2Mock(address(exocoreLzEndpoint)).setDestLzEndpoint( - address(clientGateway), address(clientChainLzEndpoint) - ); - vm.stopBroadcast(); - } - -} diff --git a/script/TokenTransfer.s.sol b/script/TokenTransfer.s.sol deleted file mode 100644 index c1505e99..00000000 --- a/script/TokenTransfer.s.sol +++ /dev/null @@ -1,123 +0,0 @@ -pragma solidity ^0.8.19; - -import "../src/core/ClientChainGateway.sol"; - -import "../src/core/ExocoreGateway.sol"; -import {Vault} from "../src/core/Vault.sol"; - -import "../src/storage/GatewayStorage.sol"; -import "@layerzero-contracts/interfaces/ILayerZeroEndpoint.sol"; -import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; -import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; - -import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; -import "forge-std/Script.sol"; - -contract DeployScript is Script { - - Player[] players; - Player depositor; - Player clientChainDeployer; - Player exocoreDeployer; - Player relayer; - Player exocoreValidatorSet; - - string clientChainRPCURL; - string exocoreRPCURL; - - ERC20PresetFixedSupply restakeToken; - - ClientChainGateway clientGateway; - Vault vault; - ExocoreGateway exocoreGateway; - ILayerZeroEndpoint clientChainLzEndpoint; - ILayerZeroEndpoint exocoreLzEndpoint; - - uint16 exocoreChainId = 0; - uint16 clientChainId = 101; - uint256 clientChain; - uint256 exocore; - uint256 constant DEFAULT_ENDPOINT_CALL_GAS_LIMIT = 200_000; - uint256 constant DEPOSIT_AMOUNT = 1e22; - uint256 constant AIRDEOP_AMOUNT = 1e28; - - struct Player { - uint256 privateKey; - address addr; - } - - function setUp() public { - clientChainDeployer.privateKey = vm.envUint("TEST_ACCOUNT_ONE_PRIVATE_KEY"); - clientChainDeployer.addr = vm.addr(clientChainDeployer.privateKey); - - exocoreDeployer.privateKey = vm.envUint("TEST_ACCOUNT_TWO_PRIVATE_KEY"); - exocoreDeployer.addr = vm.addr(exocoreDeployer.privateKey); - - exocoreValidatorSet.privateKey = vm.envUint("TEST_ACCOUNT_THREE_PRIVATE_KEY"); - exocoreValidatorSet.addr = vm.addr(exocoreValidatorSet.privateKey); - - depositor.privateKey = vm.envUint("TEST_ACCOUNT_FOUR_PRIVATE_KEY"); - depositor.addr = vm.addr(depositor.privateKey); - - relayer.privateKey = vm.envUint("TEST_ACCOUNT_FOUR_PRIVATE_KEY"); - relayer.addr = vm.addr(relayer.privateKey); - - clientChainRPCURL = vm.envString("CLIENT_CHAIN_RPC"); - exocoreRPCURL = vm.envString("EXOCORE_TESETNET_RPC"); - - string memory deployedContracts = vm.readFile("script/deployedContracts.json"); - - clientGateway = - ClientChainGateway(payable(stdJson.readAddress(deployedContracts, ".clientChain.clientChainGateway"))); - clientChainLzEndpoint = ILayerZeroEndpoint(stdJson.readAddress(deployedContracts, ".clientChain.lzEndpoint")); - restakeToken = ERC20PresetFixedSupply(stdJson.readAddress(deployedContracts, ".clientChain.erc20Token")); - vault = Vault(stdJson.readAddress(deployedContracts, ".clientChain.resVault")); - - exocoreGateway = ExocoreGateway(payable(stdJson.readAddress(deployedContracts, ".exocore.exocoreGateway"))); - exocoreLzEndpoint = ILayerZeroEndpoint(stdJson.readAddress(deployedContracts, ".exocore.lzEndpoint")); - - // transfer some gas fee to depositor, relayer and exocore gateway - clientChain = vm.createSelectFork(clientChainRPCURL); - address alexTest = 0x41B2ddC309Af448f0B96ba1595320D7Dc5121Bc0; - address aduTest = 0x7Db30262Dbf13f464eb6126daFa7EB57623A7A01; - address faucet = 0x8A21AE3e1344A83Bb05D5b1c9cFF04A9614F2567; - // vm.startBroadcast(exocoreValidatorSet.privateKey); - // if (restakeToken.balanceOf(faucet) < AIRDEOP_AMOUNT) { - // restakeToken.transfer(faucet, AIRDEOP_AMOUNT); - // } - // if (restakeToken.balanceOf(aduTest) < DEPOSIT_AMOUNT) { - // restakeToken.transfer(aduTest, DEPOSIT_AMOUNT); - // } - // if (restakeToken.balanceOf(clientChainDeployer.addr) < DEPOSIT_AMOUNT) { - // restakeToken.transfer(clientChainDeployer.addr, DEPOSIT_AMOUNT); - // } - // vm.stopBroadcast(); - - vm.startBroadcast(clientChainDeployer.privateKey); - if (address(clientGateway).balance < 0.2 ether) { - (bool sent,) = address(clientGateway).call{value: 0.2 ether}(""); - require(sent, "Failed to send Ether"); - } - if (exocoreValidatorSet.addr.balance < 0.02 ether) { - (bool sent,) = exocoreValidatorSet.addr.call{value: 0.02 ether}(""); - require(sent, "Failed to send Ether"); - } - vm.stopBroadcast(); - - exocore = vm.createSelectFork(exocoreRPCURL); - vm.startBroadcast(exocoreDeployer.privateKey); - if (relayer.addr.balance < 1 ether) { - (bool sent,) = relayer.addr.call{value: 0.1 ether}(""); - require(sent, "Failed to send Ether"); - } - if (address(exocoreGateway).balance < 1 ether) { - (bool sent,) = address(exocoreGateway).call{value: 0.1 ether}(""); - require(sent, "Failed to send Ether"); - } - vm.stopBroadcast(); - } - - function run() public {} - -} diff --git a/script/validatorProof_staker1_testnetV6.json b/script/data/validatorProof_staker1_testnetV6.json similarity index 100% rename from script/validatorProof_staker1_testnetV6.json rename to script/data/validatorProof_staker1_testnetV6.json diff --git a/script/validator_container_proof_1710700.json b/script/data/validator_container_proof_1710700.json similarity index 100% rename from script/validator_container_proof_1710700.json rename to script/data/validator_container_proof_1710700.json diff --git a/script/validator_container_proof_1711400.json b/script/data/validator_container_proof_1711400.json similarity index 100% rename from script/validator_container_proof_1711400.json rename to script/data/validator_container_proof_1711400.json diff --git a/script/withdrawalProof_fullwithdraw_2495260_2472449.json b/script/data/withdrawalProof_fullwithdraw_2495260_2472449.json similarity index 100% rename from script/withdrawalProof_fullwithdraw_2495260_2472449.json rename to script/data/withdrawalProof_fullwithdraw_2495260_2472449.json diff --git a/script/deployBeaconOracle.s.sol b/script/deployBeaconOracle.s.sol index 425d855d..b17009a4 100644 --- a/script/deployBeaconOracle.s.sol +++ b/script/deployBeaconOracle.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import "./BaseScript.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {ERC20PresetFixedSupply} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; import "forge-std/Script.sol"; diff --git a/script/capsule.json b/script/deployments/capsule.json similarity index 100% rename from script/capsule.json rename to script/deployments/capsule.json diff --git a/script/correctBootstrapErrors.json b/script/deployments/correctBootstrapErrors.json similarity index 100% rename from script/correctBootstrapErrors.json rename to script/deployments/correctBootstrapErrors.json diff --git a/script/deployedBootstrapOnly.json b/script/deployments/deployedBootstrapOnly.json similarity index 100% rename from script/deployedBootstrapOnly.json rename to script/deployments/deployedBootstrapOnly.json diff --git a/script/deployedContracts.json b/script/deployments/deployedContracts.json similarity index 78% rename from script/deployedContracts.json rename to script/deployments/deployedContracts.json index 739938fb..2ce1a9bc 100644 --- a/script/deployedContracts.json +++ b/script/deployments/deployedContracts.json @@ -20,5 +20,14 @@ "exocoreGatewayLogic": "0xe522837eB5AC11a1748046F059FeEE42A5F2F6e9", "exocoreProxyAdmin": "0x9bBDDb68B47b88d3Dd2eF7E1682C1EFE4E2e2315", "lzEndpoint": "0x6EDCE65403992e310A62460808c4b910D972f10f" + }, + "UTXOGateway": { + "proxy": "0xf6ED3734B037eb1ACA53C081C9F8593fA08B6625", + "implementation": "0xE54E77CD2127A462449a4EFc0Dd0233910D4Bf1B", + "proxyAdmin": "0xAFc8c62118D8AC2E73EC3F247C69Dd1f32EBc8E7", + "owner": "0x481E020DB4709e6EdDbf8134D41b866c6Fc8555e", + "witnesses": [ + "0xBc2978640eF1C6d9181Ed9aB3D2611914B10a6B7" + ] } } \ No newline at end of file diff --git a/script/deployedExocoreGatewayOnly.json b/script/deployments/deployedExocoreGatewayOnly.json similarity index 100% rename from script/deployedExocoreGatewayOnly.json rename to script/deployments/deployedExocoreGatewayOnly.json diff --git a/script/deployedMultisigWallets.json b/script/deployments/deployedMultisigWallets.json similarity index 100% rename from script/deployedMultisigWallets.json rename to script/deployments/deployedMultisigWallets.json diff --git a/script/prerequisiteContracts.json b/script/deployments/prerequisiteContracts.json similarity index 100% rename from script/prerequisiteContracts.json rename to script/deployments/prerequisiteContracts.json diff --git a/script/redeployClientChainGateway.json b/script/deployments/redeployClientChainGateway.json similarity index 100% rename from script/redeployClientChainGateway.json rename to script/deployments/redeployClientChainGateway.json diff --git a/script/safe_contracts_on_exocore.json b/script/deployments/safe_contracts_on_exocore.json similarity index 100% rename from script/safe_contracts_on_exocore.json rename to script/deployments/safe_contracts_on_exocore.json diff --git a/script/testContracts.json b/script/deployments/testContracts.json similarity index 100% rename from script/testContracts.json rename to script/deployments/testContracts.json diff --git a/script/deployments/utxo-gateway-exocore_localnet.json b/script/deployments/utxo-gateway-exocore_localnet.json new file mode 100644 index 00000000..81e39ff1 --- /dev/null +++ b/script/deployments/utxo-gateway-exocore_localnet.json @@ -0,0 +1,14 @@ +{ + "network": "exocore_localnet", + "utxoGatewayProxy": "0xf6ED3734B037eb1ACA53C081C9F8593fA08B6625", + "utxoGatewayLogic": "0xE54E77CD2127A462449a4EFc0Dd0233910D4Bf1B", + "proxyAdmin": "0xAFc8c62118D8AC2E73EC3F247C69Dd1f32EBc8E7", + "owner": "0x481E020DB4709e6EdDbf8134D41b866c6Fc8555e", + "witnesses": [ + "0xBc2978640eF1C6d9181Ed9aB3D2611914B10a6B7" + ], + "requiredProofs": 3, + "isAuthorized": true, + "isChainRegistered": true, + "timestamp": "2025-01-03T11:18:42.751Z" +} \ No newline at end of file diff --git a/script/hardhat/deploy-and-setup-utxogateway.script.js b/script/hardhat/deploy-and-setup-utxogateway.script.js new file mode 100644 index 00000000..3326a93f --- /dev/null +++ b/script/hardhat/deploy-and-setup-utxogateway.script.js @@ -0,0 +1,156 @@ +const { ethers } = require("hardhat"); +const fs = require('fs'); +const path = require('path'); +const { assert } = require("console"); + +const ASSETS_PRECOMPILE_ADDRESS = "0x0000000000000000000000000000000000000804"; +const DEPLOYED_CONTRACTS_PATH = path.join(__dirname, '../deployments/deployedContracts.json'); + +async function main() { + const initialAccounts = await ethers.getSigners(); + const [deployer, owner, witness1] = initialAccounts; + console.log("Deploying contracts with account:", deployer.address); + + // deployer is also the faucet + faucet = deployer; + + // transfer 1 ether gas tokens to all accounts + for (const account of initialAccounts) { + const tx = await faucet.sendTransaction({ + to: account.address, + value: ethers.parseEther("1"), + }); + // wait until the transaction is mined but should not exceed 10 seconds + await tx.wait(); + assert(await ethers.provider.getBalance(account.address) > 0, "no enough balance for account") + } + + // Load existing deployments if any + let deployedContracts = {}; + if (fs.existsSync(DEPLOYED_CONTRACTS_PATH)) { + deployedContracts = JSON.parse(fs.readFileSync(DEPLOYED_CONTRACTS_PATH, 'utf8')); + } else { + console.log("Cannot find json file of deployed contracts") + } + + try { + // Check if contracts are already deployed + if (deployedContracts.UTXOGateway) { + console.log("Using existing UTXOGateway deployment:", deployedContracts.UTXOGateway); + return; + } + + // 1. Deploy UTXOGateway Logic + console.log("\nDeploying UTXOGateway Logic..."); + const UTXOGatewayFactory = await ethers.getContractFactory("UTXOGateway"); + const utxoGatewayLogic = await UTXOGatewayFactory.connect(deployer).deploy(); + await utxoGatewayLogic.waitForDeployment(); + console.log("UTXOGateway Logic deployed to:", await utxoGatewayLogic.getAddress()); + + // 2. Deploy ProxyAdmin + console.log("\nDeploying ProxyAdmin..."); + const ProxyAdminFactory = await ethers.getContractFactory("ProxyAdmin"); + const proxyAdmin = await ProxyAdminFactory.connect(deployer).deploy(); + await proxyAdmin.waitForDeployment(); + console.log("ProxyAdmin deployed to:", await proxyAdmin.getAddress()); + + // 3. Deploy Transparent Proxy + console.log("\nDeploying Transparent Proxy..."); + const ProxyFactory = await ethers.getContractFactory("TransparentUpgradeableProxy"); + const utxoGatewayProxy = await ProxyFactory.deploy( + await utxoGatewayLogic.getAddress(), + await proxyAdmin.getAddress(), + utxoGatewayLogic.interface.encodeFunctionData("initialize", [ + owner.address, + [witness1.address], + 3 // requiredProofs + ]) + ); + await utxoGatewayProxy.waitForDeployment(); + + // Get UTXOGateway interface for the proxy + const utxoGateway = UTXOGatewayFactory.attach(await utxoGatewayProxy.getAddress()); + console.log("UTXOGateway Proxy deployed to:", await utxoGateway.getAddress()); + + // 4. Set UTXOGateway as authorized in Assets precompile + console.log("\nAuthorizing UTXOGateway in Assets precompile..."); + const assetsPrecompile = await ethers.getContractAt("IAssets", ASSETS_PRECOMPILE_ADDRESS); + const authTx = await assetsPrecompile.connect(deployer).updateAuthorizedGateways([await utxoGateway.getAddress()]); + await authTx.wait(); + + // 5. Activate staking for Bitcoin + console.log("\nActivating staking for Bitcoin..."); + const activateTx = await utxoGateway.connect(owner).activateStakingForClientChain(1); // 1 for Bitcoin + await activateTx.wait(); + + // 6. Verify setup with assertions + console.log("\nVerifying setup..."); + const [authSuccess, isAuthorized] = await assetsPrecompile.isAuthorizedGateway(await utxoGateway.getAddress()); + const [chainSuccess, isChainRegistered] = await assetsPrecompile.isRegisteredClientChain(1); + + // Assert the setup is correct + assert(authSuccess && isAuthorized, "UTXOGateway is not properly authorized"); + assert(chainSuccess && isChainRegistered, "Bitcoin chain is not properly registered"); + console.log("✅ All assertions passed"); + + // 7. Save deployment information + const deploymentInfo = { + network: network.name, + utxoGatewayProxy: await utxoGateway.getAddress(), + utxoGatewayLogic: await utxoGatewayLogic.getAddress(), + proxyAdmin: await proxyAdmin.getAddress(), + owner: owner.address, + witnesses: [witness1.address], + requiredProofs: 3, + isAuthorized, + isChainRegistered, + timestamp: new Date().toISOString() + }; + + // Save detailed deployment info + const deploymentsDir = path.join(__dirname, '../deployments'); + if (!fs.existsSync(deploymentsDir)) { + fs.mkdirSync(deploymentsDir); + } + fs.writeFileSync( + path.join(deploymentsDir, `utxo-gateway-${network.name}.json`), + JSON.stringify(deploymentInfo, null, 2) + ); + + // Update deployedContracts.json + deployedContracts.UTXOGateway = { + proxy: await utxoGateway.getAddress(), + implementation: await utxoGatewayLogic.getAddress(), + proxyAdmin: await proxyAdmin.getAddress(), + owner: owner.address, + witnesses: [witness1.address], + }; + + fs.writeFileSync( + DEPLOYED_CONTRACTS_PATH, + JSON.stringify(deployedContracts, null, 2) + ); + + console.log("\nDeployment Summary:"); + console.log("-------------------"); + console.log(deploymentInfo); + console.log("\n✅ Deployment successful and verified!"); + + } catch (error) { + console.error("❌ Deployment failed:", error); + process.exit(1); + } +} + +// Use CommonJS exports +module.exports = main; + +// Only run if script is run directly +if (require.main === module) { + main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/slither.config.json b/slither.config.json index 8f098a6c..293d8b58 100644 --- a/slither.config.json +++ b/slither.config.json @@ -1,5 +1,5 @@ { - "detectors_to_exclude": "pragma,assembly,solc-version,naming-convention,timestamp,low-level-calls,too-many-digits,similar-names,calls-loop,reentrancy-benign,reentrancy-events,dead-code", + "detectors_to_exclude": "pragma,assembly,solc-version,naming-convention,timestamp,low-level-calls,too-many-digits,similar-names,calls-loop,reentrancy-benign,reentrancy-events,dead-code,mapping-deletion", "filter_paths": "lib/|test/|mocks/|BytesLib|script/", "solc_remaps": [ "forge-std/=lib/forge-std/src/", diff --git a/src/core/BaseRestakingController.sol b/src/core/BaseRestakingController.sol index 281f52b7..dc7f282f 100644 --- a/src/core/BaseRestakingController.sol +++ b/src/core/BaseRestakingController.sol @@ -10,7 +10,7 @@ import {MessagingFee, MessagingReceipt, OAppSenderUpgradeable} from "../lzApp/OA import {ClientChainGatewayStorage} from "../storage/ClientChainGatewayStorage.sol"; import {Action} from "../storage/GatewayStorage.sol"; -import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; +import {OptionsBuilder} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; diff --git a/src/core/ClientChainGateway.sol b/src/core/ClientChainGateway.sol index 3858462b..311d3587 100644 --- a/src/core/ClientChainGateway.sol +++ b/src/core/ClientChainGateway.sol @@ -17,8 +17,8 @@ import {NativeRestakingController} from "./NativeRestakingController.sol"; import {Errors} from "../libraries/Errors.sol"; import {Action} from "../storage/GatewayStorage.sol"; -import {IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; -import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; +import {IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; +import {OptionsBuilder} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index d839ffe7..5ebf5fd4 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -21,9 +21,9 @@ import {ExocoreGatewayStorage} from "../storage/ExocoreGatewayStorage.sol"; import {Errors} from "../libraries/Errors.sol"; import {OAppCoreUpgradeable} from "../lzApp/OAppCoreUpgradeable.sol"; -import {IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; -import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; -import {ILayerZeroReceiver} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroReceiver.sol"; +import {IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; +import {OptionsBuilder} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; +import {ILayerZeroReceiver} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; diff --git a/src/core/RewardVault.sol b/src/core/RewardVault.sol index d8740dc3..052d0c1e 100644 --- a/src/core/RewardVault.sol +++ b/src/core/RewardVault.sol @@ -25,6 +25,7 @@ contract RewardVault is RewardVaultStorage, Initializable, IRewardVault { /// @inheritdoc IRewardVault function initialize(address gateway_) external initializer { + require(gateway_ != address(0), "Gateway address cannot be zero"); gateway = gateway_; } diff --git a/src/core/UTXOGateway.sol b/src/core/UTXOGateway.sol new file mode 100644 index 00000000..8912f593 --- /dev/null +++ b/src/core/UTXOGateway.sol @@ -0,0 +1,859 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {Errors} from "../libraries/Errors.sol"; +import {ExocoreBytes} from "../libraries/ExocoreBytes.sol"; + +import {ASSETS_CONTRACT} from "../interfaces/precompiles/IAssets.sol"; +import {DELEGATION_CONTRACT} from "../interfaces/precompiles/IDelegation.sol"; +import {REWARD_CONTRACT} from "../interfaces/precompiles/IReward.sol"; +import {SignatureVerifier} from "../libraries/SignatureVerifier.sol"; +import {UTXOGatewayStorage} from "../storage/UTXOGatewayStorage.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; +import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; + +/** + * @title UTXOGateway + * @dev This contract manages the gateway between Bitcoin like chains and the Exocore system. + * It handles deposits, delegations, withdrawals, and peg-out requests for BTC like tokens. + */ +contract UTXOGateway is + Initializable, + PausableUpgradeable, + OwnableUpgradeable, + ReentrancyGuardUpgradeable, + UTXOGatewayStorage +{ + + using ExocoreBytes for address; + using SignatureVerifier for bytes32; + + /** + * @notice Constructor to initialize the contract with the client chain ID. + * @dev Sets up initial configuration for testing purposes. + */ + constructor() { + _disableInitializers(); + } + + /** + * @notice Returns the app version. + * @dev This is used to check the compatibility of the gateway with the Exocore system. + * @return The app version. + */ + function appVersion() external pure returns (uint256) { + return APP_VERSION; + } + + /** + * @notice Initializes the contract with the Exocore witness address, owner address and required proofs. + * @dev If the witnesses length is greater or equal to the required proofs, the consensus requirement for stake + * message would be activated. + * @param owner_ The address of the owner. + * @param witnesses The addresses of the witnesses. + * @param requiredProofs_ The number of required proofs. + */ + function initialize(address owner_, address[] calldata witnesses, uint256 requiredProofs_) external initializer { + if (owner_ == address(0) || witnesses.length == 0) { + revert Errors.ZeroAddress(); + } + if (requiredProofs_ < MIN_REQUIRED_PROOFS || requiredProofs_ > MAX_REQUIRED_PROOFS) { + revert Errors.InvalidRequiredProofs(); + } + + requiredProofs = requiredProofs_; + for (uint256 i = 0; i < witnesses.length; i++) { + _addWitness(witnesses[i]); + } + __Pausable_init_unchained(); + __ReentrancyGuard_init_unchained(); + _transferOwnership(owner_); + } + + /** + * @notice Pauses the contract. + * @dev Can only be called by the contract owner. + */ + function pause() external onlyOwner { + _pause(); + } + + /** + * @notice Unpauses the contract. + * @dev Can only be called by the contract owner. + */ + function unpause() external onlyOwner { + _unpause(); + } + + /** + * @notice Activates token staking by registering or updating the chain and token with the Exocore system. + */ + function activateStakingForClientChain(ClientChainID clientChainId) external onlyOwner whenNotPaused { + if (clientChainId == ClientChainID.BITCOIN) { + _registerOrUpdateClientChain( + clientChainId, STAKER_ACCOUNT_LENGTH, BITCOIN_NAME, BITCOIN_METADATA, BITCOIN_SIGNATURE_SCHEME + ); + _registerOrUpdateToken(clientChainId, VIRTUAL_TOKEN, BTC_DECIMALS, BTC_NAME, BTC_METADATA, BTC_ORACLE_INFO); + } else { + revert Errors.InvalidClientChain(); + } + } + + /** + * @notice Updates the required proofs for consensus. + * @notice The consensus requirement for stake message would be activated if the current authorized witness count is + * greater than or equal to the new required proofs. + * @dev Can only be called by the contract owner. + * @param newRequiredProofs The new required proofs. + */ + function updateRequiredProofs(uint256 newRequiredProofs) external onlyOwner whenNotPaused { + if (newRequiredProofs < MIN_REQUIRED_PROOFS || newRequiredProofs > MAX_REQUIRED_PROOFS) { + revert Errors.InvalidRequiredProofs(); + } + + bool wasConsensusRequired = _isConsensusRequired(); + uint256 oldRequiredProofs = requiredProofs; + requiredProofs = newRequiredProofs; + + emit RequiredProofsUpdated(oldRequiredProofs, newRequiredProofs); + + // Check if consensus state changed due to new requirement + bool isConsensusRequired_ = _isConsensusRequired(); + if (!wasConsensusRequired && isConsensusRequired_) { + emit ConsensusActivated(requiredProofs, authorizedWitnessCount); + } else if (wasConsensusRequired && !isConsensusRequired_) { + emit ConsensusDeactivated(requiredProofs, authorizedWitnessCount); + } + } + + /** + * @notice Adds a group of authorized witnesses. + * @notice This could potentially activate consensus for stake message if the total witness count is greater than or + * equal to the required proofs. + * @param witnesses The addresses of the witnesses to be added. + * @dev Can only be called by the contract owner. + */ + function addWitnesses(address[] calldata witnesses) external onlyOwner whenNotPaused { + for (uint256 i = 0; i < witnesses.length; i++) { + _addWitness(witnesses[i]); + } + } + + /** + * @notice Removes a group of authorized witnesses. + * @notice This could potentially deactivate consensus for stake message if the total witness count is less than the + * required proofs. + * @param witnesses The addresses of the witnesses to be removed. + * @dev Can only be called by the contract owner. + */ + function removeWitnesses(address[] calldata witnesses) external onlyOwner whenNotPaused { + for (uint256 i = 0; i < witnesses.length; i++) { + _removeWitness(witnesses[i]); + } + } + + /** + * @notice Updates the bridge fee rate. + * @param bridgeFeeRate_ The new bridge fee rate, with basis as 10000, so 100 means 1% + * @dev Can only be called by the contract owner. + */ + function updateBridgeFeeRate(uint256 bridgeFeeRate_) external onlyOwner whenNotPaused { + require(bridgeFeeRate_ <= MAX_BRIDGE_FEE_RATE, "Fee cannot exceed max bridge fee rate"); + bridgeFeeRate = bridgeFeeRate_; + emit BridgeFeeRateUpdated(bridgeFeeRate_); + } + + /** + * @notice Submits a proof for a stake message. + * @notice The submitted message would be processed after collecting enough proofs from withnesses. + * @dev The stake message would be deleted after it has been processed to refund some gas, though the mapping + * inside it cannot be deleted. + * @param witness The witness address that signed the message. + * @param _message The stake message. + * @param _signature The signature of the message. + */ + // slither-disable-next-line reentrancy-no-eth + function submitProofForStakeMsg(address witness, StakeMsg calldata _message, bytes calldata _signature) + external + nonReentrant + whenNotPaused + { + if (!_isConsensusRequired()) { + revert Errors.ConsensusNotRequired(); + } + + if (!_isAuthorizedWitness(witness)) { + revert Errors.WitnessNotAuthorized(witness); + } + + bytes32 messageHash = _verifyStakeMessage(witness, _message, _signature); + + // we should revoke the tx by setting it as expired if it has expired + _revokeTxIfExpired(messageHash); + + Transaction storage txn = transactions[messageHash]; + + if (txn.status == TxStatus.PENDING) { + // if the witness has already submitted proof at or after the start of the proof window, they cannot submit + // again + if (txn.witnessTime[witness] >= txn.expiryTime - PROOF_TIMEOUT) { + revert Errors.WitnessAlreadySubmittedProof(); + } + txn.witnessTime[witness] = block.timestamp; + txn.proofCount++; + } else { + txn.status = TxStatus.PENDING; + txn.expiryTime = block.timestamp + PROOF_TIMEOUT; + txn.proofCount = 1; + txn.witnessTime[witness] = block.timestamp; + txn.stakeMsg = _message; + } + + emit ProofSubmitted(messageHash, witness); + + // Check for consensus + if (txn.proofCount >= requiredProofs) { + processedTransactions[messageHash] = true; + _processStakeMsg(txn.stakeMsg); + // we delete the transaction after it has been processed to refund some gas, so no need to worry about + // reentrancy + delete transactions[messageHash]; + + emit TransactionProcessed(messageHash); + } + } + + /** + * @notice Deposits BTC like tokens to the Exocore system. + * @param witness The witness address that signed the message. + * @param _msg The stake message. + * @param signature The signature of the message. + */ + function processStakeMessage(address witness, StakeMsg calldata _msg, bytes calldata signature) + external + nonReentrant + whenNotPaused + { + if (_isConsensusRequired()) { + revert Errors.ConsensusRequired(); + } + + if (!_isAuthorizedWitness(witness)) { + revert Errors.WitnessNotAuthorized(witness); + } + _verifyStakeMessage(witness, _msg, signature); + + _processStakeMsg(_msg); + } + + /** + * @notice Delegates BTC like tokens to an operator. + * @param token The value of the token enum. + * @param operator The operator's exocore address. + * @param amount The amount to delegate. + */ + function delegateTo(Token token, string calldata operator, uint256 amount) + external + nonReentrant + whenNotPaused + isValidAmount(amount) + isRegistered(token, msg.sender) + { + if (!isValidOperatorAddress(operator)) { + revert Errors.InvalidOperator(); + } + + ClientChainID clientChainId = ClientChainID(uint8(token)); + + bool success = _delegate(clientChainId, msg.sender, operator, amount); + if (!success) { + revert Errors.DelegationFailed(); + } + + emit DelegationCompleted(clientChainId, msg.sender, operator, amount); + } + + /** + * @notice Undelegates BTC like tokens from an operator. + * @param token The value of the token enum. + * @param operator The operator's exocore address. + * @param amount The amount to undelegate. + */ + function undelegateFrom(Token token, string calldata operator, uint256 amount) + external + nonReentrant + whenNotPaused + isValidAmount(amount) + isRegistered(token, msg.sender) + { + if (!isValidOperatorAddress(operator)) { + revert Errors.InvalidOperator(); + } + + ClientChainID clientChainId = ClientChainID(uint8(token)); + + uint64 nonce = ++delegationNonce[clientChainId]; + bool success = DELEGATION_CONTRACT.undelegate( + uint32(uint8(clientChainId)), nonce, VIRTUAL_TOKEN, msg.sender.toExocoreBytes(), bytes(operator), amount + ); + if (!success) { + revert Errors.UndelegationFailed(); + } + emit UndelegationCompleted(clientChainId, msg.sender, operator, amount); + } + + /** + * @notice Withdraws the principal BTC like tokens. + * @param token The value of the token enum. + * @param amount The amount to withdraw. + */ + function withdrawPrincipal(Token token, uint256 amount) external nonReentrant whenNotPaused isValidAmount(amount) { + ClientChainID clientChainId = ClientChainID(uint8(token)); + + bytes memory clientAddress = outboundRegistry[clientChainId][msg.sender]; + if (clientAddress.length == 0) { + revert Errors.AddressNotRegistered(); + } + + (bool success, uint256 updatedBalance) = ASSETS_CONTRACT.withdrawLST( + uint32(uint8(clientChainId)), VIRTUAL_TOKEN, msg.sender.toExocoreBytes(), amount + ); + if (!success) { + revert Errors.WithdrawPrincipalFailed(); + } + + uint64 requestId = + _initiatePegOut(clientChainId, amount, msg.sender, clientAddress, WithdrawType.WITHDRAW_PRINCIPAL); + emit WithdrawPrincipalRequested(clientChainId, requestId, msg.sender, clientAddress, amount, updatedBalance); + } + + /** + * @notice Withdraws the reward BTC like tokens. + * @param token The value of the token enum. + * @param amount The amount to withdraw. + */ + function withdrawReward(Token token, uint256 amount) external nonReentrant whenNotPaused isValidAmount(amount) { + ClientChainID clientChainId = ClientChainID(uint8(token)); + bytes memory clientAddress = outboundRegistry[clientChainId][msg.sender]; + if (clientAddress.length == 0) { + revert Errors.AddressNotRegistered(); + } + + (bool success, uint256 updatedBalance) = REWARD_CONTRACT.claimReward( + uint32(uint8(clientChainId)), VIRTUAL_TOKEN, msg.sender.toExocoreBytes(), amount + ); + if (!success) { + revert Errors.WithdrawRewardFailed(); + } + + uint64 requestId = + _initiatePegOut(clientChainId, amount, msg.sender, clientAddress, WithdrawType.WITHDRAW_REWARD); + emit WithdrawRewardRequested(clientChainId, requestId, msg.sender, clientAddress, amount, updatedBalance); + } + + /** + * @notice Processes the next peg-out request for a given client chain. + * @dev Only authorized witnesses can call this function + * @param clientChainId The client chain ID. + * @return nextPegOutRequest The peg-out request that is under processing. + */ + function processNextPegOutRequest(ClientChainID clientChainId) + external + onlyAuthorizedWitness + nonReentrant + whenNotPaused + returns (PegOutRequest memory nextPegOutRequest) + { + // Get the next request ID that should be processed + uint64 nextRequestNonce = outboundNonce[clientChainId] + 1; + + // check if the pegout request has already been processed + if (_isPegoutRequestProcessed(clientChainId, nextRequestNonce)) { + revert Errors.RequestAlreadyProcessed(nextRequestNonce); + } + + // Get the specified request + nextPegOutRequest = pegOutRequests[clientChainId][nextRequestNonce]; + + // Check if the request exists + if (nextPegOutRequest.requester == address(0)) { + revert Errors.RequestNotFound(nextRequestNonce); + } + + // Increment the nonce only after successful processing + outboundNonce[clientChainId] = nextRequestNonce; + + // Emit event with the Bitcoin transaction ID + emit PegOutRequestProcessing( + uint8(nextPegOutRequest.withdrawType), + clientChainId, + nextRequestNonce, + nextPegOutRequest.requester, + nextPegOutRequest.clientAddress, + nextPegOutRequest.amount + ); + } + + /** + * @notice Marks a peg-out request as processed, after the peg-out tx is confirmed on the client chain(e.g. Bitcoin). + * @dev Only authorized witnesses can call this function + * @param clientChainId The client chain ID. + * @param requestNonce The nonce of the peg-out request. + * @param pegOutTxId The client chain(e.g. Bitcoin) transaction ID. + */ + function markPegOutRequestProcessed(ClientChainID clientChainId, uint64 requestNonce, bytes32 pegOutTxId) + external + onlyAuthorizedWitness + nonReentrant + whenNotPaused + { + if (_isPegoutRequestProcessed(clientChainId, requestNonce)) { + revert Errors.RequestAlreadyProcessed(requestNonce); + } + + if (requestNonce < 1 || requestNonce > outboundNonce[clientChainId]) { + revert Errors.RequestNonceOutOfBounds(requestNonce); + } + + pegOutTxIds[clientChainId][requestNonce] = pegOutTxId; + + emit PegOutRequestProcessed(clientChainId, requestNonce, pegOutTxId); + } + + /** + * @notice Gets the client chain address for a given Exocore address + * @param clientChainId The client chain ID + * @param exocoreAddress The Exocore address + * @return The client chain address + */ + function getClientAddress(ClientChainID clientChainId, address exocoreAddress) + external + view + returns (bytes memory) + { + return outboundRegistry[clientChainId][exocoreAddress]; + } + + /** + * @notice Gets the Exocore address for a given client chain address + * @param clientChainId The client chain ID + * @param clientAddress The client chain address + * @return The Exocore address + */ + function getExocoreAddress(ClientChainID clientChainId, bytes calldata clientAddress) + external + view + returns (address) + { + return inboundRegistry[clientChainId][clientAddress]; + } + + /** + * @notice Gets the next inbound nonce for a given source chain ID. + * @param clientChainId The client chain ID. + * @return The next inbound nonce. + */ + function nextInboundNonce(ClientChainID clientChainId) external view returns (uint64) { + return inboundNonce[clientChainId] + 1; + } + + /** + * @notice Retrieves a PegOutRequest by client chain id and request id + * @param clientChainId The client chain ID + * @param requestId The unique identifier of the request. + * @return The PegOutRequest struct associated with the given requestId. + */ + function getPegOutRequest(ClientChainID clientChainId, uint64 requestId) + public + view + returns (PegOutRequest memory) + { + return pegOutRequests[clientChainId][requestId]; + } + + /** + * @notice Retrieves the status of a transaction. + * @param messageHash The hash of the transaction. + * @return The status of the transaction. + */ + function getTransactionStatus(bytes32 messageHash) public view returns (TxStatus) { + return transactions[messageHash].status; + } + + /** + * @notice Retrieves the proof count of a transaction. + * @param messageHash The hash of the transaction. + * @return The proof count of the transaction. + */ + function getTransactionProofCount(bytes32 messageHash) public view returns (uint256) { + return transactions[messageHash].proofCount; + } + + /** + * @notice Retrieves the expiry time of a transaction. + * @param messageHash The hash of the transaction. + * @return The expiry time of the transaction. + */ + function getTransactionExpiryTime(bytes32 messageHash) public view returns (uint256) { + return transactions[messageHash].expiryTime; + } + + /** + * @notice Retrieves the witness time of a transaction. + * @param messageHash The hash of the transaction. + * @param witness The witness address. + * @return The witness time of the transaction. + */ + function getTransactionWitnessTime(bytes32 messageHash, address witness) public view returns (uint256) { + return transactions[messageHash].witnessTime[witness]; + } + + /** + * @notice Retrieves the client chain(e.g. Bitcoin) peg-out txid for a given peg-out request + * @param clientChainId The client chain ID + * @param requestNonce The nonce of the peg-out request + * @return The client chain(e.g. Bitcoin) peg-out txid for the peg-out request + */ + function getPegoutTxId(ClientChainID clientChainId, uint64 requestNonce) external view returns (bytes32) { + return pegOutTxIds[clientChainId][requestNonce]; + } + + /** + * @notice Checks if consensus is required for a stake message. + * @return True if count of authorized witnesses is greater than or equal to requiredProofs, false otherwise. + */ + function isConsensusRequired() external view returns (bool) { + return _isConsensusRequired(); + } + + /** + * @notice Checks if a peg-out request has been processed. + * @param clientChainId The client chain ID. + * @param requestNonce The nonce of the peg-out request. + * @return True if the peg-out request has been processed, false otherwise. + */ + function isPegoutRequestProcessed(ClientChainID clientChainId, uint64 requestNonce) external view returns (bool) { + return _isPegoutRequestProcessed(clientChainId, requestNonce); + } + + /** + * @notice Checks if consensus is required for a stake message. + * @return True if count of authorized witnesses is greater than or equal to REQUIRED_PROOFS, false otherwise. + */ + function _isConsensusRequired() internal view returns (bool) { + return authorizedWitnessCount >= requiredProofs; + } + + function _isPegoutRequestProcessed(ClientChainID clientChainId, uint64 requestNonce) internal view returns (bool) { + return pegOutTxIds[clientChainId][requestNonce] != bytes32(0); + } + + /** + * @notice Checks if a witness is authorized. + * @param witness The witness address. + * @return True if the witness is authorized, false otherwise. + */ + function _isAuthorizedWitness(address witness) internal view returns (bool) { + return authorizedWitnesses[witness]; + } + + function _addWitness(address _witness) internal { + if (_witness == address(0)) { + revert Errors.ZeroAddress(); + } + if (_isAuthorizedWitness(_witness)) { + revert Errors.WitnessAlreadyAuthorized(_witness); + } + + bool wasConsensusRequired = _isConsensusRequired(); + + authorizedWitnesses[_witness] = true; + authorizedWitnessCount++; + emit WitnessAdded(_witness); + + // Emit only when crossing the threshold from false to true + if (!wasConsensusRequired && _isConsensusRequired()) { + emit ConsensusActivated(requiredProofs, authorizedWitnessCount); + } + } + + function _removeWitness(address _witness) internal { + if (authorizedWitnessCount <= 1) { + revert Errors.CannotRemoveLastWitness(); + } + if (!authorizedWitnesses[_witness]) { + revert Errors.WitnessNotAuthorized(_witness); + } + + bool wasConsensusRequired = _isConsensusRequired(); + + authorizedWitnesses[_witness] = false; + authorizedWitnessCount--; + emit WitnessRemoved(_witness); + + // Emit only when crossing the threshold from true to false + if (wasConsensusRequired && !_isConsensusRequired()) { + emit ConsensusDeactivated(requiredProofs, authorizedWitnessCount); + } + } + + /** + * @notice Registers or updates the Bitcoin chain with the Exocore system. + */ + function _registerOrUpdateClientChain( + ClientChainID clientChainId, + uint8 stakerAccountLength, + string memory name, + string memory metadata, + string memory signatureScheme + ) internal { + (bool success, bool updated) = ASSETS_CONTRACT.registerOrUpdateClientChain( + uint32(uint8(clientChainId)), stakerAccountLength, name, metadata, signatureScheme + ); + if (!success) { + revert Errors.RegisterClientChainToExocoreFailed(uint32(uint8(clientChainId))); + } + if (updated) { + emit ClientChainUpdated(clientChainId); + } else { + emit ClientChainRegistered(clientChainId); + } + } + + function _registerOrUpdateToken( + ClientChainID clientChainId, + bytes memory token, + uint8 decimals, + string memory name, + string memory metadata, + string memory oracleInfo + ) internal { + uint32 clientChainIdUint32 = uint32(uint8(clientChainId)); + bool registered = + ASSETS_CONTRACT.registerToken(clientChainIdUint32, token, decimals, name, metadata, oracleInfo); + if (!registered) { + bool updated = ASSETS_CONTRACT.updateToken(clientChainIdUint32, token, metadata); + if (!updated) { + revert Errors.AddWhitelistTokenFailed(clientChainIdUint32, bytes32(token)); + } + emit WhitelistTokenUpdated(clientChainId, VIRTUAL_TOKEN_ADDRESS); + } else { + emit WhitelistTokenAdded(clientChainId, VIRTUAL_TOKEN_ADDRESS); + } + } + + /** + * @notice Verifies the signature of a stake message. + * @param signer The signer address. + * @param _msg The stake message. + * @param signature The signature to verify. + */ + function _verifySignature(address signer, StakeMsg calldata _msg, bytes memory signature) + internal + pure + returns (bytes32 messageHash) + { + // StakeMsg, EIP721 is preferred next step. + bytes memory encodeMsg = abi.encode( + _msg.clientChainId, + _msg.clientAddress, + _msg.exocoreAddress, + _msg.operator, + _msg.amount, + _msg.nonce, + _msg.txTag + ); + messageHash = keccak256(encodeMsg); + + SignatureVerifier.verifyMsgSig(signer, messageHash, signature); + } + + /** + * @dev Verifies that all required fields in StakeMsg are valid + * @param _msg The stake message to verify + */ + function _verifyStakeMsgFields(StakeMsg calldata _msg) internal pure { + // Combine all non-zero checks into a single value + uint256 nonZeroCheck = + uint8(_msg.clientChainId) | _msg.clientAddress.length | _msg.amount | _msg.nonce | _msg.txTag.length; + + if (nonZeroCheck == 0) { + revert Errors.InvalidStakeMessage(); + } + + if (bytes(_msg.operator).length > 0 && !isValidOperatorAddress(_msg.operator)) { + revert Errors.InvalidOperator(); + } + } + + function _verifyTxTagNotProcessed(ClientChainID clientChainId, bytes calldata txTag) internal view { + if (processedClientChainTxs[clientChainId][txTag]) { + revert Errors.TxTagAlreadyProcessed(); + } + } + + /** + * @notice Verifies a stake message. + * @param witness The witness address that signed the message. + * @param _msg The stake message. + * @param signature The signature to verify. + */ + function _verifyStakeMessage(address witness, StakeMsg calldata _msg, bytes calldata signature) + internal + view + returns (bytes32 messageHash) + { + // verify that the stake message fields are valid + _verifyStakeMsgFields(_msg); + + // Verify nonce + _verifyInboundNonce(_msg.clientChainId, _msg.nonce); + + // Verify that the txTag has not been processed + _verifyTxTagNotProcessed(_msg.clientChainId, _msg.txTag); + + // Verify signature + messageHash = _verifySignature(witness, _msg, signature); + } + + /** + * @notice Initiates a peg-out request for a given token amount to a Bitcoin address + * @dev This function creates a new peg-out request and stores it in the contract's state + * @param clientChainId The client chain to be pegged out + * @param _amount The amount of tokens to be pegged out + * @param withdrawer The Exocore address associated with the Bitcoin address + * @param clientAddress The client chain address + * @param _withdrawType The type of withdrawal (e.g., normal, fast) + * @return requestId The unique identifier for the peg-out request + * @custom:throws RequestAlreadyExists if a request with the same parameters already exists + */ + function _initiatePegOut( + ClientChainID clientChainId, + uint256 _amount, + address withdrawer, + bytes memory clientAddress, + WithdrawType _withdrawType + ) internal returns (uint64 requestId) { + // 2. increase the peg-out nonce for the client chain and return as requestId + requestId = ++pegOutNonce[clientChainId]; + + // 3. Check if request already exists + PegOutRequest storage request = pegOutRequests[clientChainId][requestId]; + if (request.requester != address(0)) { + revert Errors.RequestAlreadyExists(uint32(uint8(clientChainId)), requestId); + } + + // 4. Create new PegOutRequest + request.clientChainId = clientChainId; + request.nonce = requestId; + request.requester = withdrawer; + request.clientAddress = clientAddress; + request.amount = _amount; + request.withdrawType = _withdrawType; + } + + /** + * @notice Internal function to deposit BTC like token. + * @param clientChainId The client chain ID. + * @param srcAddress The source address. + * @param depositorExoAddr The Exocore address. + * @param amount The amount to deposit. + * @param txTag The transaction tag. + */ + function _deposit( + ClientChainID clientChainId, + bytes memory srcAddress, + address depositorExoAddr, + uint256 amount, + bytes memory txTag + ) internal { + (bool success, uint256 updatedBalance) = ASSETS_CONTRACT.depositLST( + uint32(uint8(clientChainId)), VIRTUAL_TOKEN, depositorExoAddr.toExocoreBytes(), amount + ); + if (!success) { + revert Errors.DepositFailed(txTag); + } + + emit DepositCompleted(clientChainId, txTag, depositorExoAddr, srcAddress, amount, updatedBalance); + } + + /** + * @notice Internal function to delegate BTC like token. + * @param clientChainId The client chain ID. + * @param delegator The Exocore address. + * @param operator The operator's address. + * @param amount The amount to delegate. + * @return success True if the delegation was successful, false otherwise. + * @dev Sometimes we may not want to revert on failure, so we return a boolean. + */ + function _delegate(ClientChainID clientChainId, address delegator, string memory operator, uint256 amount) + internal + returns (bool success) + { + uint64 nonce = ++delegationNonce[clientChainId]; + success = DELEGATION_CONTRACT.delegate( + uint32(uint8(clientChainId)), nonce, VIRTUAL_TOKEN, delegator.toExocoreBytes(), bytes(operator), amount + ); + } + + function _revokeTxIfExpired(bytes32 txid) internal { + Transaction storage txn = transactions[txid]; + if (txn.status == TxStatus.PENDING && block.timestamp >= txn.expiryTime) { + txn.status = TxStatus.EXPIRED; + emit TransactionExpired(txid); + } + } + + function _registerAddress(ClientChainID clientChainId, bytes memory depositor, address exocoreAddress) internal { + require(depositor.length > 0 && exocoreAddress != address(0), "Invalid address"); + require(inboundRegistry[clientChainId][depositor] == address(0), "Depositor address already registered"); + require(outboundRegistry[clientChainId][exocoreAddress].length == 0, "Exocore address already registered"); + + inboundRegistry[clientChainId][depositor] = exocoreAddress; + outboundRegistry[clientChainId][exocoreAddress] = depositor; + + emit AddressRegistered(clientChainId, depositor, exocoreAddress); + } + + function _processStakeMsg(StakeMsg memory _msg) internal { + // increment inbound nonce for the client chain and mark the tx as processed + inboundNonce[_msg.clientChainId]++; + processedClientChainTxs[_msg.clientChainId][_msg.txTag] = true; + + // register address if not already registered + if ( + inboundRegistry[_msg.clientChainId][_msg.clientAddress] == address(0) + && outboundRegistry[_msg.clientChainId][_msg.exocoreAddress].length == 0 + ) { + if (_msg.exocoreAddress == address(0)) { + revert Errors.ZeroAddress(); + } + _registerAddress(_msg.clientChainId, _msg.clientAddress, _msg.exocoreAddress); + } + + address stakerExoAddr = inboundRegistry[_msg.clientChainId][_msg.clientAddress]; + uint256 fee = _msg.amount * bridgeFeeRate / BASIS_POINTS; + uint256 amountAfterFee = _msg.amount - fee; + + // we use registered exocore address as the depositor + // this should always succeed and never revert, otherwise something is wrong. + _deposit(_msg.clientChainId, _msg.clientAddress, stakerExoAddr, amountAfterFee, _msg.txTag); + + // delegate to operator if operator is provided, and do not revert if it fails since we need to count the stake + // as deposited + if (bytes(_msg.operator).length > 0) { + bool success = _delegate(_msg.clientChainId, stakerExoAddr, _msg.operator, amountAfterFee); + if (!success) { + emit DelegationFailedForStake(_msg.clientChainId, stakerExoAddr, _msg.operator, amountAfterFee); + } else { + emit DelegationCompleted(_msg.clientChainId, stakerExoAddr, _msg.operator, amountAfterFee); + } + } + + emit StakeMsgExecuted(_msg.clientChainId, _msg.nonce, stakerExoAddr, amountAfterFee); + } + +} diff --git a/src/interfaces/IClientChainGateway.sol b/src/interfaces/IClientChainGateway.sol index ac9cc518..8187b186 100644 --- a/src/interfaces/IClientChainGateway.sol +++ b/src/interfaces/IClientChainGateway.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.19; import {INativeRestakingController} from "../interfaces/INativeRestakingController.sol"; import {ILSTRestakingController} from "./ILSTRestakingController.sol"; -import {IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; -import {IOAppReceiver} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppReceiver.sol"; +import {IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; +import {IOAppReceiver} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppReceiver.sol"; interface IClientChainGateway is IOAppReceiver, IOAppCore, ILSTRestakingController, INativeRestakingController { diff --git a/src/interfaces/IExocoreGateway.sol b/src/interfaces/IExocoreGateway.sol index 73ad1a2b..53fb0e30 100644 --- a/src/interfaces/IExocoreGateway.sol +++ b/src/interfaces/IExocoreGateway.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; -import {IOAppReceiver} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppReceiver.sol"; +import {IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; +import {IOAppReceiver} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppReceiver.sol"; /// @title IExocoreGateway /// @author ExocoreNetwork diff --git a/src/interfaces/precompiles/IAssets.sol b/src/interfaces/precompiles/IAssets.sol index f1f11c37..a904078e 100644 --- a/src/interfaces/precompiles/IAssets.sol +++ b/src/interfaces/precompiles/IAssets.sol @@ -7,6 +7,43 @@ address constant ASSETS_PRECOMPILE_ADDRESS = 0x000000000000000000000000000000000 /// @dev The Assets contract's instance. IAssets constant ASSETS_CONTRACT = IAssets(ASSETS_PRECOMPILE_ADDRESS); +/// @dev The TokenInfo struct. +/// @param name The name of the token +/// @param symbol The symbol of the token +/// @param clientChainID The client chain ID +/// @param tokenID The token ID, typically the token address encoded in bytes +/// @param decimals The number of decimals of the token +/// @param totalStaked The total staked amount of the token +struct TokenInfo { + string name; + string symbol; + uint32 clientChainID; + bytes tokenID; + uint8 decimals; + uint256 totalStaked; +} + +/// @dev The StakerBalance struct. +/// @param clientChainID The client chain ID +/// @param stakerAddress The staker address, typically the staker's address encoded in bytes +/// @param tokenID The token ID, typically the token address encoded in bytes +/// @param balance The balance of the staker, balance = withdrawable + delegated + pendingUndelegated +/// @param withdrawable The withdrawable balance +/// @param delegated The delegated balance +/// @param pendingUndelegated The pending undelegated balance, during the unboding period and would become withdrawable +/// after the unboding period +/// @param totalDeposited The total deposited balance +struct StakerBalance { + uint32 clientChainID; + bytes stakerAddress; + bytes tokenID; + uint256 balance; + uint256 withdrawable; + uint256 delegated; + uint256 pendingUndelegated; + uint256 totalDeposited; +} + /// @author Exocore Team /// @title Assets Precompile Contract /// @dev The interface through which solidity contracts will interact with assets module @@ -14,8 +51,8 @@ IAssets constant ASSETS_CONTRACT = IAssets(ASSETS_PRECOMPILE_ADDRESS); interface IAssets { /// TRANSACTIONS - /// @dev deposit the client chain assets, mainly LSTs, for the staker, - /// that will change the state in deposit module + /// @dev deposit the client chain assets, only LSTs, for the staker, + /// that will change the state in assets module /// Note that this address cannot be a module account. /// @param clientChainID is the layerZero chainID if it is supported. // It might be allocated by Exocore when the client chain isn't supported @@ -30,9 +67,8 @@ interface IAssets { uint256 opAmount ) external returns (bool success, uint256 latestAssetState); - /// TRANSACTIONS /// @dev deposit the client chain assets, native staking tokens, for the staker, - /// that will change the state in deposit module + /// that will change the state in assets module /// Note that this address cannot be a module account. /// @param clientChainID is the layerZero chainID if it is supported. // It might be allocated by Exocore when the client chain isn't supported @@ -47,7 +83,7 @@ interface IAssets { uint256 opAmount ) external returns (bool success, uint256 latestAssetState); - /// @dev withdraw LST To the staker, that will change the state in withdraw module + /// @dev withdraw LST To the staker, that will change the state in assets module /// Note that this address cannot be a module account. /// @param clientChainID is the layerZero chainID if it is supported. // It might be allocated by Exocore when the client chain isn't supported @@ -62,7 +98,7 @@ interface IAssets { uint256 opAmount ) external returns (bool success, uint256 latestAssetState); - /// @dev withdraw NST To the staker, that will change the state in withdraw module + /// @dev withdraw NST To the staker, that will change the state in assets module /// Note that this address cannot be a module account. /// @param clientChainID is the layerZero chainID if it is supported. // It might be allocated by Exocore when the client chain isn't supported @@ -119,6 +155,12 @@ interface IAssets { external returns (bool success); + /// @dev update the authorized gateways, only the authorized gateways can call precompile functions + /// @dev If it is the mainnet, only the authority can call this function + /// @param gateways the authorized gateways + /// @return success if the update is successful + function updateAuthorizedGateways(address[] calldata gateways) external returns (bool success); + /// QUERIES /// @dev Returns the chain indices of the client chains. function getClientChains() external view returns (bool, uint32[] memory); @@ -129,4 +171,30 @@ interface IAssets { /// @return isRegistered true if the client chain is registered function isRegisteredClientChain(uint32 clientChainID) external view returns (bool success, bool isRegistered); + /// @dev Checks if the gateway is authorized, given the gateway address. + /// @param gateway is the address of the gateway + /// @return success true if the query is successful + /// @return isAuthorized true if the gateway is authorized + function isAuthorizedGateway(address gateway) external view returns (bool success, bool isAuthorized); + + /// @dev Returns the asset info for a given asset ID. + /// @param clientChainId is the ID of the client chain + /// @param tokenId is the ID of the token, typically the token address + /// @return success true if the query is successful + /// @return assetInfo the asset info + function getTokenInfo(uint32 clientChainId, bytes calldata tokenId) + external + view + returns (bool success, TokenInfo memory assetInfo); + + /// @dev Returns the staker's balance for a given token. + /// @param clientChainId is the ID of the client chain + /// @param tokenId is the ID of the token, typically the token address + /// @return success true if the query is successful + /// @return stakerBalance the staker's balance + function getStakerBalanceByToken(uint32 clientChainId, bytes calldata stakerAddress, bytes calldata tokenId) + external + view + returns (bool success, StakerBalance memory stakerBalance); + } diff --git a/src/interfaces/precompiles/IDelegation.sol b/src/interfaces/precompiles/IDelegation.sol index 8e75eae1..2232ec2a 100644 --- a/src/interfaces/precompiles/IDelegation.sol +++ b/src/interfaces/precompiles/IDelegation.sol @@ -77,4 +77,20 @@ interface IDelegation { external returns (bool success); + function delegateToThroughBtcGateway( + uint32 clientChainId, + bytes memory assetsAddress, + bytes memory stakerAddress, + bytes memory operatorAddr, + uint256 opAmount + ) external returns (bool success); + + function undelegateFromThroughBtcGateway( + uint32 clientChainId, + bytes memory assetsAddress, + bytes memory stakerAddress, + bytes memory operatorAddr, + uint256 opAmount + ) external returns (bool success); + } diff --git a/src/libraries/Errors.sol b/src/libraries/Errors.sol index 88dbaf96..a36ca6e3 100644 --- a/src/libraries/Errors.sol +++ b/src/libraries/Errors.sol @@ -314,4 +314,86 @@ library Errors { /// @dev RewardVault: insufficient balance error InsufficientBalance(); + /* -------------------------------------------------------------------------- */ + /* UTXOGateway Errors */ + /* -------------------------------------------------------------------------- */ + + /// @dev UTXOGateway: witness has already submitted proof + error WitnessAlreadySubmittedProof(); + + /// @dev UTXOGateway: invalid stake message + error InvalidStakeMessage(); + + /// @dev UTXOGateway: transaction tag has already been processed + error TxTagAlreadyProcessed(); + + /// @dev UTXOGateway: invalid operator address + error InvalidOperator(); + + /// @dev UTXOGateway: invalid token + error InvalidToken(); + + /// @dev UTXOGateway: witness has already been authorized + error WitnessAlreadyAuthorized(address witness); + + /// @dev UTXOGateway: witness has not been authorized + error WitnessNotAuthorized(address witness); + + /// @dev UTXOGateway: cannot remove the last witness + error CannotRemoveLastWitness(); + + /// @dev UTXOGateway: invalid client chain + error InvalidClientChain(); + + /// @dev UTXOGateway: deposit failed + error DepositFailed(bytes txTag); + + /// @dev UTXOGateway: address not registered + error AddressNotRegistered(); + + /// @dev UTXOGateway: delegation failed + error DelegationFailed(); + + /// @dev UTXOGateway: withdraw principal failed + error WithdrawPrincipalFailed(); + + /// @dev UTXOGateway: undelegation failed + error UndelegationFailed(); + + /// @dev UTXOGateway: withdraw reward failed + error WithdrawRewardFailed(); + + /// @dev UTXOGateway: request not found + error RequestNotFound(uint64 requestId); + + /// @dev UTXOGateway: request already exists + error RequestAlreadyExists(uint32 clientChain, uint64 requestId); + + /// @dev UTXOGateway: witness not authorized + error UnauthorizedWitness(); + + /// @dev UTXOGateway: consensus is not activated + error ConsensusNotRequired(); + + /// @dev UTXOGateway: consensus is required + error ConsensusRequired(); + + /// @dev UTXOGateway: invalid required proofs + error InvalidRequiredProofs(); + + /// @dev UTXOGateway: invalid request nonce + error InvalidRequestNonce(uint64 expectedNonce, uint64 providedNonce); + + /// @dev UTXOGateway: request already processed + error RequestAlreadyProcessed(uint64 requestNonce); + + /// @dev UTXOGateway: proposer is not authorized + error UnauthorizedProposer(); + + /// @dev UTXOGateway: invalid pegout tx id + error InvalidPegoutTxId(); + + /// @dev UTXOGateway: request nonce is out of bounds + error RequestNonceOutOfBounds(uint64 requestNonce); + } diff --git a/src/libraries/ExocoreBytes.sol b/src/libraries/ExocoreBytes.sol new file mode 100644 index 00000000..7d5ee374 --- /dev/null +++ b/src/libraries/ExocoreBytes.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +library ExocoreBytes { + + /// @notice Converts an Ethereum address to Exocore's 32-byte address format + /// @param addr The Ethereum address to convert + /// @return The address as 32-byte Exocore format (20 bytes + right padding) + function toExocoreBytes(address addr) internal pure returns (bytes memory) { + return abi.encodePacked(bytes32(bytes20(addr))); + } + +} diff --git a/src/libraries/SignatureVerifier.sol b/src/libraries/SignatureVerifier.sol new file mode 100644 index 00000000..5b348470 --- /dev/null +++ b/src/libraries/SignatureVerifier.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +// Signature-related +bytes32 constant EIP2098_allButHighestBitMask = (0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); + +library SignatureVerifier { + + // define errors. + error BadSignatureV(uint8 v); + error InvalidSigner(); + error InvalidSignature(); + + function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { + // 32 is the length in bytes of hash, + // enforced by the type signature above + /// @solidity memory-safe-assembly + assembly { + mstore(0x00, "\x19Ethereum Signed Message:\n32") + mstore(0x1c, hash) + message := keccak256(0x00, 0x3c) + } + } + + function verifyMsgSig(address signer, bytes32 messageHash, bytes memory signature) internal pure { + // Declare r, s, and v signature parameters. + bytes32 r = 0; + bytes32 s = 0; + uint8 v = 0; + if (signature.length == 64) { + // If signature contains 64 bytes, parse as EIP-2098 sig. (r+s&v) + // Declare temporary vs that will be decomposed into s and v. + bytes32 vs; + + // Decode signature into r, vs. + (r, vs) = abi.decode(signature, (bytes32, bytes32)); + + // Decompose vs into s and v. + s = vs & EIP2098_allButHighestBitMask; + + // If the highest bit is set, v = 28, otherwise v = 27. + v = uint8(uint256(vs >> 255)) + 27; + } else if (signature.length == 65) { + (r, s) = abi.decode(signature, (bytes32, bytes32)); + v = uint8(signature[64]); + + // Ensure v value is properly formatted. + if (v != 27 && v != 28) { + revert BadSignatureV(v); + } + } else { + revert InvalidSignature(); + } + + bytes32 digest = toEthSignedMessageHash(messageHash); + + // Attempt to recover signer using the digest and signature parameters. + address recoveredSigner = ecrecover(digest, v, r, s); + + // Disallow invalid signers. + if (recoveredSigner == address(0) || recoveredSigner != signer) { + revert InvalidSigner(); + } + } + +} diff --git a/src/lzApp/OAppCoreUpgradeable.sol b/src/lzApp/OAppCoreUpgradeable.sol index b13e8492..c71e50f1 100644 --- a/src/lzApp/OAppCoreUpgradeable.sol +++ b/src/lzApp/OAppCoreUpgradeable.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import {ILayerZeroEndpointV2, IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; +import {ILayerZeroEndpointV2, IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /** diff --git a/src/lzApp/OAppReceiverUpgradeable.sol b/src/lzApp/OAppReceiverUpgradeable.sol index 7a36963b..0b1b70e6 100644 --- a/src/lzApp/OAppReceiverUpgradeable.sol +++ b/src/lzApp/OAppReceiverUpgradeable.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; import {OAppCoreUpgradeable} from "./OAppCoreUpgradeable.sol"; -import {IOAppReceiver, Origin} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppReceiver.sol"; +import {IOAppReceiver, Origin} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppReceiver.sol"; /** * @title OAppReceiverUpgradeable diff --git a/src/lzApp/OAppSenderUpgradeable.sol b/src/lzApp/OAppSenderUpgradeable.sol index eba21210..b15c784c 100644 --- a/src/lzApp/OAppSenderUpgradeable.sol +++ b/src/lzApp/OAppSenderUpgradeable.sol @@ -7,7 +7,7 @@ import { MessagingFee, MessagingParams, MessagingReceipt -} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** diff --git a/src/storage/UTXOGatewayStorage.sol b/src/storage/UTXOGatewayStorage.sol new file mode 100644 index 00000000..d9cb0d91 --- /dev/null +++ b/src/storage/UTXOGatewayStorage.sol @@ -0,0 +1,498 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {Errors} from "../libraries/Errors.sol"; + +/** + * @title UTXOGatewayStorage + * @dev This contract manages the storage for the UTXO gateway + */ +contract UTXOGatewayStorage { + + /** + * @notice Enum to represent the type of supported token + * @dev Each field should be matched with the corresponding field of ClientChainID + */ + enum Token { + NONE, // 0: Invalid/uninitialized token + BTC // 1: Bitcoin token, matches with ClientChainID.Bitcoin + + } + + /** + * @notice Enum to represent the supported client chain ID + * @dev Each field should be matched with the corresponding field of Token + */ + enum ClientChainID { + NONE, // 0: Invalid/uninitialized chain + BITCOIN // 1: Bitcoin chain, matches with Token.BTC + + } + + /** + * @dev Enum to represent the status of a transaction + */ + enum TxStatus { + NOT_STARTED_OR_PROCESSED, // 0: transaction hasn't started collecting proofs or has been processed + PENDING, // 1: Currently collecting witness proofs + EXPIRED // 2: Failed due to timeout, but can be retried + + } + + /** + * @dev Enum to represent the WithdrawType + */ + enum WithdrawType { + UNDEFINED, + WITHDRAW_PRINCIPAL, + WITHDRAW_REWARD + } + + /** + * @dev Struct to store stake message information + * @param clientChainId The client chain ID + * @param clientAddress The client chain address + * @param exocoreAddress The Exocore address + * @param operator The operator + * @param amount The amount + * @param nonce The nonce + * @param txTag The tx tag + */ + struct StakeMsg { + ClientChainID clientChainId; + bytes clientAddress; + address exocoreAddress; + string operator; + uint256 amount; + uint64 nonce; + bytes txTag; + } + + /** + * @dev Struct to store proof information + */ + struct Proof { + address witness; + StakeMsg message; + uint256 timestamp; + bytes signature; + } + + /** + * @dev Struct to store transaction information + */ + struct Transaction { + TxStatus status; + uint256 proofCount; + uint256 expiryTime; + mapping(address => uint256) witnessTime; + StakeMsg stakeMsg; + } + + /** + * @dev Struct for peg-out requests + */ + struct PegOutRequest { + ClientChainID clientChainId; + uint64 nonce; + address requester; + bytes clientAddress; + uint256 amount; + WithdrawType withdrawType; + } + + /* -------------------------------------------------------------------------- */ + /* Constants */ + /* -------------------------------------------------------------------------- */ + /// @notice the app version + uint256 public constant APP_VERSION = 1; + + /// @notice the human readable prefix for Exocore bech32 encoded address. + bytes public constant EXO_ADDRESS_PREFIX = bytes("exo1"); + + // the virtual chain id for Bitcoin, compatible with other chain ids(endpoint ids) maintained by layerzero + string public constant BITCOIN_NAME = "Bitcoin"; + string public constant BITCOIN_METADATA = "Bitcoin"; + string public constant BITCOIN_SIGNATURE_SCHEME = "ECDSA"; + uint8 public constant STAKER_ACCOUNT_LENGTH = 20; + + // virtual token address and token, shared for tokens supported by the gateway + address public constant VIRTUAL_TOKEN_ADDRESS = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB; + bytes public constant VIRTUAL_TOKEN = abi.encodePacked(bytes32(bytes20(VIRTUAL_TOKEN_ADDRESS))); + + uint8 public constant BTC_DECIMALS = 8; + string public constant BTC_NAME = "BTC"; + string public constant BTC_METADATA = "BTC"; + string public constant BTC_ORACLE_INFO = "BTC,BITCOIN,8"; + + uint256 public constant PROOF_TIMEOUT = 1 days; + uint256 public bridgeFeeRate; // e.g., 100 (basis points) means 1% + uint256 public constant BASIS_POINTS = 10_000; // 100% = 10000 basis points + uint256 public constant MAX_BRIDGE_FEE_RATE = 1000; // 10% + + // Add min/max bounds for safety + uint256 public constant MIN_REQUIRED_PROOFS = 1; + uint256 public constant MAX_REQUIRED_PROOFS = 10; + + /// @notice The number of proofs required for consensus + uint256 public requiredProofs; + + /// @notice The count of authorized witnesses + uint256 public authorizedWitnessCount; + + /** + * @dev Mapping to store transaction information, key is the message hash + */ + mapping(bytes32 => Transaction) public transactions; + + /** + * @dev Mapping to store processed transactions + */ + mapping(bytes32 => bool) public processedTransactions; + + /** + * @dev Mapping to store processed ClientChain transactions + */ + mapping(ClientChainID => mapping(bytes => bool)) public processedClientChainTxs; + + /** + * @dev Mapping to store peg-out requests + * @dev Key1: ClientChainID + * @dev Key2: nonce + * @dev Value: PegOutRequest + */ + mapping(ClientChainID => mapping(uint64 => PegOutRequest)) public pegOutRequests; + + /** + * @dev Mapping to store authorized witnesses + */ + mapping(address => bool) public authorizedWitnesses; + + /** + * @dev Maps client chain addresses to their registered Exocore addresses + * @dev Key1: Client chain ID (Bitcoin, etc.) + * @dev Key2: Client chain address in bytes + * @dev Value: Registered Exocore address + */ + mapping(ClientChainID => mapping(bytes => address)) public inboundRegistry; + + /** + * @dev Maps Exocore addresses to their registered client chain addresses + * @dev Key1: Client chain ID (Bitcoin, etc.) + * @dev Key2: Exocore address + * @dev Value: Registered client chain address in bytes + */ + mapping(ClientChainID => mapping(address => bytes)) public outboundRegistry; + + /** + * @dev Mapping to store inbound nonce for each chain + */ + mapping(ClientChainID => uint64) public inboundNonce; + + /** + * @notice Mapping to store outbound nonce for each chain + */ + mapping(ClientChainID => uint64) public outboundNonce; + + /** + * @notice Mapping to store peg-out nonce for each chain + */ + mapping(ClientChainID => uint64) public pegOutNonce; + + /** + * @notice Mapping to store delegation nonce for each chain + * @dev The nonce is incremented for each delegate/undelegate operation + * @dev The nonce is provided to the precompile as operation id + */ + mapping(ClientChainID => uint64) public delegationNonce; + + // Mapping from chain ID and request ID to client chain transaction ID + mapping(ClientChainID => mapping(uint64 => bytes32)) public pegOutTxIds; + + uint256[40] private __gap; + + // Events + + /** + * @dev Emitted when the required proofs is updated + * @param oldRequired The old required proofs + * @param newRequired The new required proofs + */ + event RequiredProofsUpdated(uint256 oldRequired, uint256 newRequired); + + /** + * @dev Emitted when a stake message is executed + * @param clientChainId The chain ID of the client chain, should not violate the layerzero chain id + * @param nonce The nonce of the stake message + * @param exocoreAddress The Exocore address of the depositor + * @param amount The amount deposited(delegated) + */ + event StakeMsgExecuted( + ClientChainID indexed clientChainId, uint64 nonce, address indexed exocoreAddress, uint256 amount + ); + + /** + * @dev Emitted when a transaction is processed + * @param txId The hash of the stake message + */ + event TransactionProcessed(bytes32 indexed txId); + + /** + * @dev Emitted when a deposit is completed + * @param clientChainId The client chain ID + * @param txTag The txid + vout-index + * @param depositorExoAddr The depositor's Exocore address + * @param depositorClientChainAddr The depositor's client chain address + * @param amount The amount deposited + * @param updatedBalance The updated balance after deposit + */ + event DepositCompleted( + ClientChainID indexed clientChainId, + bytes txTag, + address indexed depositorExoAddr, + bytes depositorClientChainAddr, + uint256 amount, + uint256 updatedBalance + ); + + /** + * @dev Emitted when a principal withdrawal is requested + * @param requestId The unique identifier for the withdrawal request + * @param clientChainId The client chain ID + * @param withdrawerExoAddr The withdrawer's Exocore address + * @param withdrawerClientChainAddr The withdrawer's client chain address + * @param amount The amount to withdraw + * @param updatedBalance The updated balance after withdrawal request + */ + event WithdrawPrincipalRequested( + ClientChainID indexed clientChainId, + uint64 indexed requestId, + address indexed withdrawerExoAddr, + bytes withdrawerClientChainAddr, + uint256 amount, + uint256 updatedBalance + ); + + /** + * @dev Emitted when a reward withdrawal is requested + * @param requestId The unique identifier for the withdrawal request + * @param clientChainId The client chain ID + * @param withdrawerExoAddr The withdrawer's Exocore address + * @param withdrawerClientChainAddr The withdrawer's client chain address + * @param amount The amount to withdraw + * @param updatedBalance The updated balance after withdrawal request + */ + event WithdrawRewardRequested( + ClientChainID indexed clientChainId, + uint64 indexed requestId, + address indexed withdrawerExoAddr, + bytes withdrawerClientChainAddr, + uint256 amount, + uint256 updatedBalance + ); + + /** + * @dev Emitted when a delegation is completed + * @param clientChainId The chain ID of the client chain, should not violate the layerzero chain id + * @param exoDelegator The delegator's Exocore address + * @param operator The operator's address + * @param amount The amount delegated + */ + event DelegationCompleted( + ClientChainID indexed clientChainId, address indexed exoDelegator, string operator, uint256 amount + ); + + /** + * @dev Emitted when a delegation fails for a stake message + * @param clientChainId The chain ID of the client chain, should not violate the layerzero chain id + * @param exoDelegator The delegator's Exocore address + * @param operator The operator's address + * @param amount The amount delegated + */ + event DelegationFailedForStake( + ClientChainID indexed clientChainId, address indexed exoDelegator, string operator, uint256 amount + ); + + /** + * @dev Emitted when an undelegation is completed + * @param clientChainId The chain ID of the client chain, should not violate the layerzero chain id + * @param exoDelegator The delegator's Exocore address + * @param operator The operator's address + * @param amount The amount undelegated + */ + event UndelegationCompleted( + ClientChainID indexed clientChainId, address indexed exoDelegator, string operator, uint256 amount + ); + + /** + * @dev Emitted when an address is registered + * @param clientChainId The client chain ID + * @param depositor The depositor's address + * @param exocoreAddress The corresponding Exocore address + */ + event AddressRegistered(ClientChainID indexed clientChainId, bytes depositor, address indexed exocoreAddress); + + /** + * @dev Emitted when a new witness is added + * @param witness The address of the added witness + */ + event WitnessAdded(address indexed witness); + + /** + * @dev Emitted when a witness is removed + * @param witness The address of the removed witness + */ + event WitnessRemoved(address indexed witness); + + /** + * @dev Emitted when a proof is submitted + * @param messageHash The hash of the stake message + * @param witness The address of the witness submitting the proof + */ + event ProofSubmitted(bytes32 indexed messageHash, address indexed witness); + + /** + * @dev Emitted when a deposit is processed + * @param txTag The txid + vout-index + * @param recipient The address of the recipient + * @param amount The amount processed + */ + event DepositProcessed(bytes txTag, address indexed recipient, uint256 amount); + + /** + * @dev Emitted when a transaction expires + * @param txid The message hash of the expired transaction + */ + event TransactionExpired(bytes32 txid); + + /** + * @dev Emitted when the bridge rate is updated + * @param newRate The new bridge rate + */ + event BridgeFeeRateUpdated(uint256 newRate); + + /** + * @dev Emitted when the deposit limit is updated + * @param newLimit The new deposit limit + */ + event DepositLimitUpdated(uint256 newLimit); + + /** + * @dev Emitted when the withdrawal limit is updated + * @param newLimit The new withdrawal limit + */ + event WithdrawalLimitUpdated(uint256 newLimit); + + /** + * @dev Emitted when a peg-out request is under processing + * @param withdrawType The type of withdrawal + * @param clientChainId The client chain ID + * @param requestNonce The nonce of the peg-out request + * @param requester The requester's address + * @param clientAddress The client chain address + * @param amount The amount to withdraw + */ + event PegOutRequestProcessing( + uint8 withdrawType, + ClientChainID indexed clientChainId, + uint64 indexed requestNonce, + address indexed requester, + bytes clientAddress, + uint256 amount + ); + + /** + * @dev Emitted when a peg-out request is processed + * @param clientChainId The client chain ID + * @param requestNonce The nonce of the peg-out request + * @param pegOutTxId The client chain(e.g. Bitcoin) transaction ID + */ + event PegOutRequestProcessed(ClientChainID indexed clientChainId, uint64 indexed requestNonce, bytes32 pegOutTxId); + + /// @notice Emitted upon the registration of a new client chain. + /// @param clientChainId The chain ID of the client chain. + event ClientChainRegistered(ClientChainID clientChainId); + + /// @notice Emitted upon the update of a client chain. + /// @param clientChainId The chain ID of the client chain. + event ClientChainUpdated(ClientChainID clientChainId); + + /// @notice Emitted when a token is added to the whitelist. + /// @param clientChainId The chain ID of the client chain. + /// @param token The address of the token. + event WhitelistTokenAdded(ClientChainID clientChainId, address indexed token); + + /// @notice Emitted when a token is updated in the whitelist. + /// @param clientChainId The chain ID of the client chain. + /// @param token The address of the token. + event WhitelistTokenUpdated(ClientChainID clientChainId, address indexed token); + + /// @notice Emitted when consensus is activated + /// @param requiredWitnessesCount The number of required witnesses + /// @param authorizedWitnessesCount The number of authorized witnesses + event ConsensusActivated(uint256 requiredWitnessesCount, uint256 authorizedWitnessesCount); + + /// @notice Emitted when consensus is deactivated + /// @param requiredWitnessesCount The number of required witnesses + /// @param authorizedWitnessesCount The number of authorized witnesses + event ConsensusDeactivated(uint256 requiredWitnessesCount, uint256 authorizedWitnessesCount); + + /** + * @dev Modifier to check if an amount is valid + * @param amount The amount to check + */ + modifier isValidAmount(uint256 amount) { + if (amount == 0) { + revert Errors.ZeroAmount(); + } + _; + } + + modifier isRegistered(Token token, address exocoreAddress) { + if (outboundRegistry[ClientChainID(uint8(token))][exocoreAddress].length == 0) { + revert Errors.AddressNotRegistered(); + } + _; + } + + /** + * @dev Modifier to restrict access to authorized witnesses only. + */ + modifier onlyAuthorizedWitness() { + if (!authorizedWitnesses[msg.sender]) { + revert Errors.UnauthorizedWitness(); + } + _; + } + + /// @notice Checks if the provided string is a valid Exocore address. + /// @param addressToValidate The string to check. + /// @return True if the string is valid, false otherwise. + /// @dev Since implementation of bech32 is difficult in Solidity, this function only + /// checks that the address is 42 characters long and starts with "exo1". + function isValidOperatorAddress(string calldata addressToValidate) public pure returns (bool) { + bytes memory stringBytes = bytes(addressToValidate); + if (stringBytes.length != 42) { + return false; + } + for (uint256 i = 0; i < EXO_ADDRESS_PREFIX.length; ++i) { + if (stringBytes[i] != EXO_ADDRESS_PREFIX[i]) { + return false; + } + } + + return true; + } + + /** + * @dev Internal function to verify and update the inbound bytes nonce + * @param srcChainId The source chain ID + * @param nonce The nonce to verify + */ + function _verifyInboundNonce(ClientChainID srcChainId, uint64 nonce) internal view { + if (nonce != inboundNonce[srcChainId] + 1) { + revert Errors.UnexpectedInboundNonce(inboundNonce[srcChainId] + 1, nonce); + } + } + +} diff --git a/test/foundry/Delegation.t.sol b/test/foundry/Delegation.t.sol index d2f45c0c..9f88586a 100644 --- a/test/foundry/Delegation.t.sol +++ b/test/foundry/Delegation.t.sol @@ -7,8 +7,8 @@ import {Action, GatewayStorage} from "../../src/storage/GatewayStorage.sol"; import "../mocks/DelegationMock.sol"; import "./ExocoreDeployer.t.sol"; -import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import {OptionsBuilder} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import "forge-std/Test.sol"; diff --git a/test/foundry/DepositThenDelegateTo.t.sol b/test/foundry/DepositThenDelegateTo.t.sol index 39904ccb..ebce8a42 100644 --- a/test/foundry/DepositThenDelegateTo.t.sol +++ b/test/foundry/DepositThenDelegateTo.t.sol @@ -9,8 +9,8 @@ import "../mocks/AssetsMock.sol"; import "../mocks/DelegationMock.sol"; import "./ExocoreDeployer.t.sol"; -import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import {OptionsBuilder} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "forge-std/Test.sol"; diff --git a/test/foundry/DepositWithdrawPrinciple.t.sol b/test/foundry/DepositWithdrawPrinciple.t.sol index 4278005a..34a4f4ca 100644 --- a/test/foundry/DepositWithdrawPrinciple.t.sol +++ b/test/foundry/DepositWithdrawPrinciple.t.sol @@ -11,7 +11,7 @@ import {Action, GatewayStorage} from "../../src/storage/GatewayStorage.sol"; import "./ExocoreDeployer.t.sol"; import "forge-std/Test.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import "@openzeppelin/contracts/utils/Create2.sol"; diff --git a/test/foundry/ExocoreDeployer.t.sol b/test/foundry/ExocoreDeployer.t.sol index 91b0fc25..698d172c 100644 --- a/test/foundry/ExocoreDeployer.t.sol +++ b/test/foundry/ExocoreDeployer.t.sol @@ -1,8 +1,8 @@ pragma solidity ^0.8.19; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; diff --git a/test/foundry/Governance.t.sol b/test/foundry/Governance.t.sol index b6280f43..b27c0d6f 100644 --- a/test/foundry/Governance.t.sol +++ b/test/foundry/Governance.t.sol @@ -10,9 +10,9 @@ import "src/utils/CustomTimelockController.sol"; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; diff --git a/test/foundry/TvlLimits.t.sol b/test/foundry/TvlLimits.t.sol index 26a2eddb..23ef83eb 100644 --- a/test/foundry/TvlLimits.t.sol +++ b/test/foundry/TvlLimits.t.sol @@ -10,7 +10,7 @@ import "../../src/storage/GatewayStorage.sol"; import "./ExocoreDeployer.t.sol"; import "forge-std/Test.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import "@openzeppelin/contracts/utils/Create2.sol"; diff --git a/test/foundry/unit/ClientChainGateway.t.sol b/test/foundry/unit/ClientChainGateway.t.sol index 73624752..e52b9362 100644 --- a/test/foundry/unit/ClientChainGateway.t.sol +++ b/test/foundry/unit/ClientChainGateway.t.sol @@ -2,10 +2,10 @@ pragma solidity ^0.8.19; import "@beacon-oracle/contracts/src/EigenLayerBeaconOracle.sol"; -import "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import {Origin} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import {Origin} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; diff --git a/test/foundry/unit/ExocoreGateway.t.sol b/test/foundry/unit/ExocoreGateway.t.sol index bc2d8d07..01958c76 100644 --- a/test/foundry/unit/ExocoreGateway.t.sol +++ b/test/foundry/unit/ExocoreGateway.t.sol @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import {NonShortCircuitEndpointV2Mock} from "../../mocks/NonShortCircuitEndpointV2Mock.sol"; @@ -12,7 +13,7 @@ import "test/mocks/AssetsMock.sol"; import "test/mocks/DelegationMock.sol"; import "test/mocks/RewardMock.sol"; -import "@layerzero-v2/protocol/contracts/libs/AddressCast.sol"; +import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol"; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; diff --git a/test/foundry/unit/UTXOGateway.t.sol b/test/foundry/unit/UTXOGateway.t.sol new file mode 100644 index 00000000..851ca4bd --- /dev/null +++ b/test/foundry/unit/UTXOGateway.t.sol @@ -0,0 +1,1782 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "forge-std/Test.sol"; +import {UTXOGateway} from "src/core/UTXOGateway.sol"; + +import "src/interfaces/precompiles/IAssets.sol"; +import "src/interfaces/precompiles/IDelegation.sol"; +import "src/interfaces/precompiles/IReward.sol"; +import {Errors} from "src/libraries/Errors.sol"; + +import {ExocoreBytes} from "src/libraries/ExocoreBytes.sol"; +import {SignatureVerifier} from "src/libraries/SignatureVerifier.sol"; +import {UTXOGatewayStorage} from "src/storage/UTXOGatewayStorage.sol"; +import "test/mocks/AssetsMock.sol"; +import "test/mocks/DelegationMock.sol"; +import "test/mocks/RewardMock.sol"; + +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +contract UTXOGatewayTest is Test { + + using stdStorage for StdStorage; + using SignatureVerifier for bytes32; + using ExocoreBytes for address; + + struct Player { + uint256 privateKey; + address addr; + } + + UTXOGateway gateway; + UTXOGateway gatewayLogic; + address owner; + address user; + address relayer; + Player[3] witnesses; + bytes btcAddress; + string operator; + + address public constant EXOCORE_WITNESS = address(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); + + // chain id from layerzero, virtual for bitcoin since it's not yet a layerzero chain + string public constant BITCOIN_NAME = "Bitcoin"; + string public constant BITCOIN_METADATA = "Bitcoin"; + string public constant BITCOIN_SIGNATURE_SCHEME = "ECDSA"; + uint8 public constant STAKER_ACCOUNT_LENGTH = 20; + + // virtual token address and token, shared for tokens supported by the gateway + address public constant VIRTUAL_TOKEN_ADDRESS = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB; + bytes public constant VIRTUAL_TOKEN = abi.encodePacked(bytes32(bytes20(VIRTUAL_TOKEN_ADDRESS))); + + uint8 public constant BTC_DECIMALS = 8; + string public constant BTC_NAME = "BTC"; + string public constant BTC_METADATA = "BTC"; + string public constant BTC_ORACLE_INFO = "BTC,BITCOIN,8"; + + uint256 public initialRequiredProofs = 3; + uint256 public constant PROOF_TIMEOUT = 1 days; + + event WitnessAdded(address indexed witness); + event WitnessRemoved(address indexed witness); + event AddressRegistered( + UTXOGatewayStorage.ClientChainID indexed chainId, bytes depositor, address indexed exocoreAddress + ); + event DepositCompleted( + UTXOGatewayStorage.ClientChainID indexed chainId, + bytes txTag, + address indexed exocoreAddress, + bytes srcAddress, + uint256 amount, + uint256 updatedBalance + ); + event DelegationCompleted( + UTXOGatewayStorage.ClientChainID indexed chainId, address indexed delegator, string operator, uint256 amount + ); + event UndelegationCompleted( + UTXOGatewayStorage.ClientChainID indexed clientChainId, + address indexed exoDelegator, + string operator, + uint256 amount + ); + event ProofSubmitted(bytes32 indexed messageHash, address indexed witness); + event StakeMsgExecuted(bytes32 indexed txId); + event BridgeFeeRateUpdated(uint256 newRate); + + event ClientChainRegistered(UTXOGatewayStorage.ClientChainID clientChainId); + event ClientChainUpdated(UTXOGatewayStorage.ClientChainID clientChainId); + event WhitelistTokenAdded(UTXOGatewayStorage.ClientChainID clientChainId, address indexed token); + event WhitelistTokenUpdated(UTXOGatewayStorage.ClientChainID clientChainId, address indexed token); + event DelegationFailedForStake( + UTXOGatewayStorage.ClientChainID indexed clientChainId, + address indexed exoDelegator, + string operator, + uint256 amount + ); + event StakeMsgExecuted( + UTXOGatewayStorage.ClientChainID indexed chainId, uint64 nonce, address indexed exocoreAddress, uint256 amount + ); + event TransactionProcessed(bytes32 indexed txId); + + event WithdrawPrincipalRequested( + UTXOGatewayStorage.ClientChainID indexed srcChainId, + uint64 indexed requestId, + address indexed withdrawerExoAddr, + bytes withdrawerClientChainAddr, + uint256 amount, + uint256 updatedBalance + ); + event WithdrawRewardRequested( + UTXOGatewayStorage.ClientChainID indexed srcChainId, + uint64 indexed requestId, + address indexed withdrawerExoAddr, + bytes withdrawerClientChainAddr, + uint256 amount, + uint256 updatedBalance + ); + event PegOutRequestProcessing( + uint8 withdrawType, + UTXOGatewayStorage.ClientChainID indexed clientChainId, + uint64 indexed requestNonce, + address indexed requester, + bytes clientAddress, + uint256 amount + ); + event PegOutRequestProcessed( + UTXOGatewayStorage.ClientChainID indexed clientChainId, uint64 indexed requestNonce, bytes32 pegOutTxId + ); + + event ConsensusActivated(uint256 requiredProofs, uint256 authorizedWitnessCount); + event ConsensusDeactivated(uint256 requiredProofs, uint256 authorizedWitnessCount); + event RequiredProofsUpdated(uint256 oldRequired, uint256 newRequired); + + function setUp() public { + owner = address(1); + user = address(2); + relayer = address(3); + witnesses[0] = Player({privateKey: 0xa, addr: vm.addr(0xa)}); + witnesses[1] = Player({privateKey: 0xb, addr: vm.addr(0xb)}); + witnesses[2] = Player({privateKey: 0xc, addr: vm.addr(0xc)}); + + btcAddress = bytes("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"); + operator = "exo13hasr43vvq8v44xpzh0l6yuym4kca98f87j7ac"; + + // Deploy and initialize gateway + gatewayLogic = new UTXOGateway(); + gateway = UTXOGateway(address(new TransparentUpgradeableProxy(address(gatewayLogic), address(0xab), ""))); + address[] memory initialWitnesses = new address[](1); + initialWitnesses[0] = witnesses[0].addr; + gateway.initialize(owner, initialWitnesses, initialRequiredProofs); + } + + function test_initialize() public { + assertEq(gateway.owner(), owner); + assertTrue(gateway.authorizedWitnesses(witnesses[0].addr)); + assertEq(gateway.authorizedWitnessCount(), 1); + assertEq(gateway.requiredProofs(), initialRequiredProofs); + assertFalse(gateway.isConsensusRequired()); + } + + function test_UpdateRequiredProofs_Success() public { + uint256 oldRequiredProofs = gateway.requiredProofs(); + + vm.prank(owner); + vm.expectEmit(true, true, true, true); + emit RequiredProofsUpdated(oldRequiredProofs, 2); + gateway.updateRequiredProofs(2); + + assertEq(gateway.requiredProofs(), 2); + } + + function test_UpdateRequiredProofs_ConsensusStateChange() public { + // Initially consensus should be inactive (1 witnesses < 3 required) + assertFalse(gateway.isConsensusRequired()); + uint256 oldRequiredProofs = gateway.requiredProofs(); + uint256 witnessCount = gateway.authorizedWitnessCount(); + + // Lower required proofs to 1, should activate consensus + vm.prank(owner); + vm.expectEmit(true, true, true, true); + emit RequiredProofsUpdated(oldRequiredProofs, witnessCount); + vm.expectEmit(true, true, true, true); + emit ConsensusActivated(witnessCount, witnessCount); + gateway.updateRequiredProofs(witnessCount); + + assertTrue(gateway.isConsensusRequired()); + } + + function test_UpdateRequiredProofs_RevertInvalidValue() public { + vm.startPrank(owner); + vm.expectRevert(Errors.InvalidRequiredProofs.selector); + gateway.updateRequiredProofs(0); // Below minimum + + vm.expectRevert(Errors.InvalidRequiredProofs.selector); + gateway.updateRequiredProofs(11); // Above maximum + vm.stopPrank(); + } + + function test_UpdateRequiredProofs_RevertNotOwner() public { + vm.prank(user); + vm.expectRevert("Ownable: caller is not the owner"); + gateway.updateRequiredProofs(2); + } + + function test_UpdateRequiredProofs_RevertWhenPaused() public { + vm.startPrank(owner); + gateway.pause(); + + vm.expectRevert("Pausable: paused"); + gateway.updateRequiredProofs(2); + vm.stopPrank(); + } + + function test_AddWitnesses_Success() public { + vm.prank(owner); + + vm.expectEmit(true, false, false, false); + emit WitnessAdded(witnesses[1].addr); + + address[] memory witnessesToAdd = new address[](1); + witnessesToAdd[0] = witnesses[1].addr; + gateway.addWitnesses(witnessesToAdd); + assertTrue(gateway.authorizedWitnesses(witnesses[1].addr)); + assertEq(gateway.authorizedWitnessCount(), 2); + } + + function test_AddWitnesses_RevertNotOwner() public { + address[] memory witnessesToAdd = new address[](1); + witnessesToAdd[0] = witnesses[1].addr; + + vm.prank(user); + vm.expectRevert("Ownable: caller is not the owner"); + gateway.addWitnesses(witnessesToAdd); + } + + function test_AddWitnesses_RevertZeroAddress() public { + address[] memory witnessesToAdd = new address[](1); + witnessesToAdd[0] = address(0); + + vm.prank(owner); + vm.expectRevert(Errors.ZeroAddress.selector); + gateway.addWitnesses(witnessesToAdd); + } + + function test_AddWitnesses_RevertAlreadyAuthorized() public { + address[] memory witnessesToAdd = new address[](1); + witnessesToAdd[0] = witnesses[1].addr; + + vm.startPrank(owner); + gateway.addWitnesses(witnessesToAdd); + + // Try to add the same witness again + vm.expectRevert(abi.encodeWithSelector(Errors.WitnessAlreadyAuthorized.selector, witnesses[1].addr)); + gateway.addWitnesses(witnessesToAdd); + vm.stopPrank(); + } + + function test_AddWitnesses_RevertWhenPaused() public { + address[] memory witnessesToAdd = new address[](1); + witnessesToAdd[0] = witnesses[1].addr; + + vm.startPrank(owner); + gateway.pause(); + + vm.expectRevert("Pausable: paused"); + gateway.addWitnesses(witnessesToAdd); + vm.stopPrank(); + } + + function test_AddWitnesses_ConsensusActivation() public { + // initially we have 1 witness, and required proofs is 3 + assertEq(gateway.authorizedWitnessCount(), 1); + assertEq(gateway.requiredProofs(), 3); + assertFalse(gateway.isConsensusRequired()); + + address[] memory witnessesToAdd = new address[](1); + + vm.startPrank(owner); + // Add second witness - no consensus event + witnessesToAdd[0] = witnesses[1].addr; + gateway.addWitnesses(witnessesToAdd); + + // Add third witness - should emit ConsensusActivated + witnessesToAdd[0] = witnesses[2].addr; + vm.expectEmit(true, true, true, true); + emit ConsensusActivated(gateway.requiredProofs(), gateway.authorizedWitnessCount() + 1); + gateway.addWitnesses(witnessesToAdd); + + // Add fourth witness - no consensus event + witnessesToAdd[0] = address(0xaa); + gateway.addWitnesses(witnessesToAdd); + + vm.stopPrank(); + } + + function test_RemoveWitnesses() public { + vm.startPrank(owner); + address[] memory witnessesToAdd = new address[](1); + + // we need to add a witness before removing the first witness, since we cannot remove the last witness + witnessesToAdd[0] = witnesses[1].addr; + gateway.addWitnesses(witnessesToAdd); + assertTrue(gateway.authorizedWitnesses(witnesses[1].addr)); + assertEq(gateway.authorizedWitnessCount(), 2); + + vm.expectEmit(true, false, false, false); + emit WitnessRemoved(witnesses[0].addr); + + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[0].addr; + gateway.removeWitnesses(witnessesToRemove); + assertFalse(gateway.authorizedWitnesses(witnesses[0].addr)); + assertEq(gateway.authorizedWitnessCount(), 1); + } + + function test_RemoveWitnesses_RevertNotOwner() public { + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[0].addr; + + vm.prank(user); + vm.expectRevert("Ownable: caller is not the owner"); + gateway.removeWitnesses(witnessesToRemove); + } + + function test_RemoveWitnesses_RevertWitnessNotAuthorized() public { + // first add another witness to make total witnesses count 2 + address[] memory witnessesToAdd = new address[](1); + witnessesToAdd[0] = witnesses[1].addr; + vm.startPrank(owner); + gateway.addWitnesses(witnessesToAdd); + + // try to remove the unauthorized one + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[2].addr; + vm.expectRevert(abi.encodeWithSelector(Errors.WitnessNotAuthorized.selector, witnesses[2].addr)); + gateway.removeWitnesses(witnessesToRemove); + vm.stopPrank(); + } + + function test_RemoveWitnesses_RevertWhenPaused() public { + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[0].addr; + + vm.startPrank(owner); + gateway.pause(); + + vm.expectRevert("Pausable: paused"); + gateway.removeWitnesses(witnessesToRemove); + vm.stopPrank(); + } + + function test_RemoveWitnesses_CannotRemoveLastWitness() public { + // there should be only one witness added + assertEq(gateway.authorizedWitnessCount(), 1); + + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[0].addr; + + vm.startPrank(owner); + // Try to remove the hardcoded witness + vm.expectRevert(Errors.CannotRemoveLastWitness.selector); + gateway.removeWitnesses(witnessesToRemove); + vm.stopPrank(); + } + + function test_RemoveWitnesses_MultipleRemovals() public { + vm.startPrank(owner); + + // First add another 2 witnesses + address[] memory witnessesToAdd = new address[](2); + witnessesToAdd[0] = witnesses[1].addr; + witnessesToAdd[1] = witnesses[2].addr; + gateway.addWitnesses(witnessesToAdd); + assertTrue(gateway.authorizedWitnesses(witnesses[1].addr)); + assertTrue(gateway.authorizedWitnesses(witnesses[2].addr)); + assertEq(gateway.authorizedWitnessCount(), 3); + + // Remove first witness + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[0].addr; + gateway.removeWitnesses(witnessesToRemove); + assertFalse(gateway.authorizedWitnesses(witnesses[0].addr)); + assertTrue(gateway.authorizedWitnesses(witnesses[1].addr)); + assertEq(gateway.authorizedWitnessCount(), 2); + + // Remove second witness + witnessesToRemove[0] = witnesses[1].addr; + gateway.removeWitnesses(witnessesToRemove); + assertFalse(gateway.authorizedWitnesses(witnesses[1].addr)); + assertEq(gateway.authorizedWitnessCount(), 1); + + vm.stopPrank(); + } + + function test_RemoveWitnesses_ConsensusDeactivation() public { + // add total 3 witnesses + _addAllWitnesses(); + + // set required proofs to 2 + vm.startPrank(owner); + gateway.updateRequiredProofs(2); + + // Remove one witness - no consensus event + address[] memory witnessesToRemove = new address[](1); + witnessesToRemove[0] = witnesses[2].addr; + gateway.removeWitnesses(witnessesToRemove); + + // Remove another witness - should emit ConsensusDeactivated + vm.expectEmit(true, true, true, true); + emit ConsensusDeactivated(gateway.requiredProofs(), gateway.authorizedWitnessCount() - 1); + witnessesToRemove[0] = witnesses[1].addr; + gateway.removeWitnesses(witnessesToRemove); + vm.stopPrank(); + } + + function test_UpdateBridgeFee() public { + uint256 newFee = 500; // 5% + + vm.prank(owner); + vm.expectEmit(true, false, false, true); + emit BridgeFeeRateUpdated(newFee); + + gateway.updateBridgeFeeRate(newFee); + assertEq(gateway.bridgeFeeRate(), newFee); + } + + function test_UpdateBridgeFee_Zero() public { + vm.prank(owner); + vm.expectEmit(true, false, false, true); + emit BridgeFeeRateUpdated(0); + + gateway.updateBridgeFeeRate(0); + assertEq(gateway.bridgeFeeRate(), 0); + } + + function test_UpdateBridgeFee_MaxFee() public { + uint256 maxFee = 1000; // 10% + + vm.prank(owner); + vm.expectEmit(true, false, false, true); + emit BridgeFeeRateUpdated(maxFee); + + gateway.updateBridgeFeeRate(maxFee); + assertEq(gateway.bridgeFeeRate(), maxFee); + } + + function test_UpdateBridgeFee_RevertExceedMax() public { + vm.prank(owner); + vm.expectRevert("Fee cannot exceed max bridge fee rate"); + gateway.updateBridgeFeeRate(1001); // 10.01% + } + + function test_UpdateBridgeFee_RevertNotOwner() public { + vm.prank(user); + vm.expectRevert("Ownable: caller is not the owner"); + gateway.updateBridgeFeeRate(500); + } + + function test_UpdateBridgeFee_RevertWhenPaused() public { + vm.startPrank(owner); + gateway.pause(); + + vm.expectRevert("Pausable: paused"); + gateway.updateBridgeFeeRate(500); + vm.stopPrank(); + } + + function test_UpdateBridgeFee_MultipleFeeUpdates() public { + vm.startPrank(owner); + + // First update + uint256 firstFee = 300; + vm.expectEmit(true, false, false, true); + emit BridgeFeeRateUpdated(firstFee); + gateway.updateBridgeFeeRate(firstFee); + assertEq(gateway.bridgeFeeRate(), firstFee); + + // Second update + uint256 secondFee = 700; + vm.expectEmit(true, false, false, true); + emit BridgeFeeRateUpdated(secondFee); + gateway.updateBridgeFeeRate(secondFee); + assertEq(gateway.bridgeFeeRate(), secondFee); + + vm.stopPrank(); + } + + function test_ActivateStakingForClientChain_Success() public { + vm.startPrank(owner); + + // Mock successful chain registration + bytes memory chainRegisterCall = abi.encodeWithSelector( + IAssets.registerOrUpdateClientChain.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + STAKER_ACCOUNT_LENGTH, + BITCOIN_NAME, + BITCOIN_METADATA, + BITCOIN_SIGNATURE_SCHEME + ); + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + chainRegisterCall, + abi.encode(true, false) // success = true, updated = false (new registration) + ); + + // Mock successful token registration + bytes memory tokenRegisterCall = abi.encodeWithSelector( + IAssets.registerToken.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + BTC_DECIMALS, + BTC_NAME, + BTC_METADATA, + BTC_ORACLE_INFO + ); + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + tokenRegisterCall, + abi.encode(true) // success = true + ); + + vm.expectEmit(true, false, false, false); + emit ClientChainRegistered(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.expectEmit(true, false, false, false); + emit WhitelistTokenAdded(UTXOGatewayStorage.ClientChainID.BITCOIN, VIRTUAL_TOKEN_ADDRESS); + + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.stopPrank(); + } + + function test_ActivateStakingForClientChain_UpdateExisting() public { + vm.startPrank(owner); + + // Mock chain update + bytes memory chainRegisterCall = abi.encodeWithSelector( + IAssets.registerOrUpdateClientChain.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + STAKER_ACCOUNT_LENGTH, + BITCOIN_NAME, + BITCOIN_METADATA, + BITCOIN_SIGNATURE_SCHEME + ); + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + chainRegisterCall, + abi.encode(true, true) // success = true, updated = true (updating existing) + ); + + // Mock token update + bytes memory tokenRegisterCall = abi.encodeWithSelector( + IAssets.registerToken.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + BTC_DECIMALS, + BTC_NAME, + BTC_METADATA, + BTC_ORACLE_INFO + ); + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + tokenRegisterCall, + abi.encode(false) // registration fails, indicating existing token + ); + + // Mock token update call + bytes memory tokenUpdateCall = abi.encodeWithSelector( + IAssets.updateToken.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + BTC_METADATA + ); + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + tokenUpdateCall, + abi.encode(true) // update succeeds + ); + + vm.expectEmit(true, false, false, false); + emit ClientChainUpdated(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.expectEmit(true, false, false, false); + emit WhitelistTokenUpdated(UTXOGatewayStorage.ClientChainID.BITCOIN, VIRTUAL_TOKEN_ADDRESS); + + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.stopPrank(); + } + + function test_ActivateStakingForClientChain_RevertChainRegistrationFailed() public { + vm.startPrank(owner); + + // Mock failed chain registration + bytes memory chainRegisterCall = abi.encodeWithSelector( + IAssets.registerOrUpdateClientChain.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + STAKER_ACCOUNT_LENGTH, + BITCOIN_NAME, + BITCOIN_METADATA, + BITCOIN_SIGNATURE_SCHEME + ); + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + chainRegisterCall, + abi.encode(false, false) // registration failed + ); + + vm.expectRevert( + abi.encodeWithSelector( + Errors.RegisterClientChainToExocoreFailed.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)) + ) + ); + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.stopPrank(); + } + + function test_ActivateStakingForClientChain_RevertTokenRegistrationAndUpdateFailed() public { + vm.startPrank(owner); + + // Mock successful chain registration + bytes memory chainRegisterCall = abi.encodeWithSelector( + IAssets.registerOrUpdateClientChain.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + STAKER_ACCOUNT_LENGTH, + BITCOIN_NAME, + BITCOIN_METADATA, + BITCOIN_SIGNATURE_SCHEME + ); + vm.mockCall(ASSETS_PRECOMPILE_ADDRESS, chainRegisterCall, abi.encode(true, false)); + + // Mock failed token registration + bytes memory tokenRegisterCall = abi.encodeWithSelector( + IAssets.registerToken.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + BTC_DECIMALS, + BTC_NAME, + BTC_METADATA, + BTC_ORACLE_INFO + ); + vm.mockCall(ASSETS_PRECOMPILE_ADDRESS, tokenRegisterCall, abi.encode(false)); + + // Mock failed token update + bytes memory tokenUpdateCall = abi.encodeWithSelector( + IAssets.updateToken.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + BTC_METADATA + ); + vm.mockCall(ASSETS_PRECOMPILE_ADDRESS, tokenUpdateCall, abi.encode(false)); + + vm.expectRevert( + abi.encodeWithSelector( + Errors.AddWhitelistTokenFailed.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + bytes32(VIRTUAL_TOKEN) + ) + ); + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.stopPrank(); + } + + function test_ActivateStakingForClientChain_RevertInvalidChain() public { + vm.prank(owner); + vm.expectRevert(Errors.InvalidClientChain.selector); + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.NONE); + } + + function test_ActivateStakingForClientChain_RevertNotOwner() public { + vm.prank(user); + vm.expectRevert("Ownable: caller is not the owner"); + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.BITCOIN); + } + + function test_ActivateStakingForClientChain_RevertWhenPaused() public { + vm.startPrank(owner); + gateway.pause(); + + vm.expectRevert("Pausable: paused"); + gateway.activateStakingForClientChain(UTXOGatewayStorage.ClientChainID.BITCOIN); + vm.stopPrank(); + } + + function test_SubmitProofForStakeMsg_Success() public { + _addAllWitnesses(); + _activateConsensus(); + + // Create stake message + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1-0") + }); + + bytes32 txId = _getMessageHash(stakeMsg); + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + // Submit proof from first witness + vm.prank(relayer); + vm.expectEmit(true, true, false, true); + emit ProofSubmitted(txId, witnesses[0].addr); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature); + + // Submit proof from second witness + signature = _generateSignature(stakeMsg, witnesses[1].privateKey); + vm.prank(relayer); + vm.expectEmit(true, true, false, true); + emit ProofSubmitted(txId, witnesses[1].addr); + gateway.submitProofForStakeMsg(witnesses[1].addr, stakeMsg, signature); + + // Submit proof from thrid witness and trigger message execution as we have enough proofs + // mock Assets precompile deposit success and Delegation precompile delegate success + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IAssets.depositLST.selector), + abi.encode(true, stakeMsg.amount) + ); + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(true) + ); + + signature = _generateSignature(stakeMsg, witnesses[2].privateKey); + vm.prank(relayer); + vm.expectEmit(true, false, false, false); + emit StakeMsgExecuted(stakeMsg.clientChainId, stakeMsg.nonce, stakeMsg.exocoreAddress, stakeMsg.amount); + vm.expectEmit(true, false, false, false); + emit TransactionProcessed(txId); + gateway.submitProofForStakeMsg(witnesses[2].addr, stakeMsg, signature); + + // Verify message was processed + assertTrue(gateway.processedClientChainTxs(stakeMsg.clientChainId, stakeMsg.txTag)); + assertTrue(gateway.processedTransactions(txId)); + } + + function test_SubmitProofForStakeMsg_RevertConsensusDeactivated() public { + _addAllWitnesses(); + + // deactivate consensus for stake message by updating the value of requiredProofs + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // First witness submits proof + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectRevert(abi.encodeWithSelector(Errors.ConsensusNotRequired.selector)); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature); + } + + function test_SubmitProofForStakeMsg_RevertInvalidSignature() public { + _addAllWitnesses(); + _activateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1-0") + }); + + bytes memory invalidSignature = bytes("invalid"); + + vm.prank(relayer); + vm.expectRevert(SignatureVerifier.InvalidSignature.selector); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, invalidSignature); + } + + function test_SubmitProofForStakeMsg_RevertUnauthorizedWitness() public { + _addAllWitnesses(); + _activateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + Player memory unauthorizedWitness = Player({privateKey: 99, addr: vm.addr(99)}); + bytes memory signature = _generateSignature(stakeMsg, unauthorizedWitness.privateKey); + + vm.prank(unauthorizedWitness.addr); + vm.expectRevert(abi.encodeWithSelector(Errors.WitnessNotAuthorized.selector, unauthorizedWitness.addr)); + gateway.submitProofForStakeMsg(unauthorizedWitness.addr, stakeMsg, signature); + } + + function test_SubmitProofForStakeMsg_ExpiredBeforeConsensus() public { + _addAllWitnesses(); + _activateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // Submit proofs from requiredProofs - 1 witnesses + for (uint256 i = 0; i < gateway.requiredProofs() - 1; i++) { + bytes memory signature = _generateSignature(stakeMsg, witnesses[i].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[i].addr, stakeMsg, signature); + } + + // Move time forward past expiry + vm.warp(block.timestamp + PROOF_TIMEOUT + 1); + + // Submit the last proof + bytes memory lastSignature = _generateSignature(stakeMsg, witnesses[gateway.requiredProofs() - 1].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[gateway.requiredProofs() - 1].addr, stakeMsg, lastSignature); + + // Verify transaction is restarted owing to expired and not processed + bytes32 messageHash = _getMessageHash(stakeMsg); + assertEq(uint8(gateway.getTransactionStatus(messageHash)), uint8(UTXOGatewayStorage.TxStatus.PENDING)); + assertEq(gateway.getTransactionProofCount(messageHash), 1); + assertFalse(gateway.processedClientChainTxs(stakeMsg.clientChainId, stakeMsg.txTag)); + } + + function test_SubmitProofForStakeMsg_RestartExpiredTransaction() public { + _addAllWitnesses(); + _activateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // First witness submits proof + bytes memory signature0 = _generateSignature(stakeMsg, witnesses[0].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature0); + + // Move time forward past expiry + vm.warp(block.timestamp + PROOF_TIMEOUT + 1); + + // Same witness submits proof again to restart transaction + bytes memory signature0Restart = _generateSignature(stakeMsg, witnesses[0].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature0Restart); + + bytes32 messageHash = _getMessageHash(stakeMsg); + + // Verify transaction is restarted + assertEq(uint8(gateway.getTransactionStatus(messageHash)), uint8(UTXOGatewayStorage.TxStatus.PENDING)); + assertEq(gateway.getTransactionProofCount(messageHash), 1); + assertTrue(gateway.getTransactionWitnessTime(messageHash, witnesses[0].addr) > 0); + assertFalse(gateway.processedTransactions(messageHash)); + } + + function test_SubmitProofForStakeMsg_JoinRestartedTransaction() public { + _addAllWitnesses(); + _activateConsensus(); + // afater activating consensus, required proofs should be set as 3 + assertEq(gateway.requiredProofs(), 3); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // First witness submits proof + bytes memory signature0 = _generateSignature(stakeMsg, witnesses[0].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature0); + + // Move time forward past expiry + vm.warp(block.timestamp + PROOF_TIMEOUT + 1); + + // Second witness restarts transaction + bytes memory signature1 = _generateSignature(stakeMsg, witnesses[1].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[1].addr, stakeMsg, signature1); + + // First witness can submit proof again in new round + // as requiredProofs is 3, the transaction should not be processed even if the first witness submits proof + bytes memory signature0New = _generateSignature(stakeMsg, witnesses[0].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature0New); + + bytes32 messageHash = _getMessageHash(stakeMsg); + + // Verify both witnesses' proofs are counted + assertEq(uint8(gateway.getTransactionStatus(messageHash)), uint8(UTXOGatewayStorage.TxStatus.PENDING)); + assertEq(gateway.getTransactionProofCount(messageHash), 2); + assertFalse(gateway.processedTransactions(messageHash)); + assertFalse(gateway.processedClientChainTxs(stakeMsg.clientChainId, stakeMsg.txTag)); + assertTrue(gateway.getTransactionWitnessTime(messageHash, witnesses[0].addr) > 0); + assertTrue(gateway.getTransactionWitnessTime(messageHash, witnesses[1].addr) > 0); + } + + function test_SubmitProofForStakeMsg_RevertDuplicateProofInSameRound() public { + _addAllWitnesses(); + _activateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // First submission + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + vm.prank(relayer); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signature); + + // Try to submit again in same round + bytes memory signatureSecond = _generateSignature(stakeMsg, witnesses[0].privateKey); + vm.prank(relayer); + vm.expectRevert(Errors.WitnessAlreadySubmittedProof.selector); + gateway.submitProofForStakeMsg(witnesses[0].addr, stakeMsg, signatureSecond); + } + + function test_ProcessStakeMessage_RevertConsensusActivated() public { + _activateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectRevert(Errors.ConsensusRequired.selector); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RegisterNewAddress() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: "", + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // mock Assets precompile deposit success and Delegation precompile delegate success + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IAssets.depositLST.selector), + abi.encode(true, stakeMsg.amount) + ); + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(true) + ); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectEmit(true, true, true, true); + emit AddressRegistered(UTXOGatewayStorage.ClientChainID.BITCOIN, btcAddress, user); + vm.expectEmit(true, true, true, true); + emit StakeMsgExecuted(UTXOGatewayStorage.ClientChainID.BITCOIN, stakeMsg.nonce, user, stakeMsg.amount); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + + // Verify address registration + assertEq(gateway.getClientAddress(UTXOGatewayStorage.ClientChainID.BITCOIN, user), btcAddress); + assertEq(gateway.getExocoreAddress(UTXOGatewayStorage.ClientChainID.BITCOIN, btcAddress), user); + } + + function test_ProcessStakeMessage_WithBridgeFee() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // first owner updates bridge fee + vm.prank(owner); + gateway.updateBridgeFeeRate(100); + + // then relayer submits proof and we should see the bridge fee deducted from the amount + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + uint256 amountAfterFee = 1 ether - 1 ether * 100 / 10_000; + + // mock Assets precompile deposit success and Delegation precompile delegate success + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IAssets.depositLST.selector), + abi.encode(true, amountAfterFee) + ); + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(true) + ); + + vm.expectEmit(true, true, true, true, address(gateway)); + emit DepositCompleted( + UTXOGatewayStorage.ClientChainID.BITCOIN, + stakeMsg.txTag, + user, + stakeMsg.clientAddress, + amountAfterFee, + amountAfterFee + ); + + vm.expectEmit(true, true, true, true, address(gateway)); + emit DelegationCompleted(UTXOGatewayStorage.ClientChainID.BITCOIN, user, operator, amountAfterFee); + + vm.prank(relayer); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_WithDelegation() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // mock Assets precompile deposit success and Delegation precompile delegate success + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IAssets.depositLST.selector), + abi.encode(true, stakeMsg.amount) + ); + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(true) + ); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectEmit(true, true, true, true); + emit DelegationCompleted(UTXOGatewayStorage.ClientChainID.BITCOIN, user, operator, 1 ether); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_DelegationFailureNotRevert() public { + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: operator, + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // mock Assets precompile deposit success and Delegation precompile delegate failure + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IAssets.depositLST.selector), + abi.encode(true, stakeMsg.amount) + ); + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(false) + ); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + // deposit should be successful + vm.expectEmit(true, true, true, true); + emit DepositCompleted( + UTXOGatewayStorage.ClientChainID.BITCOIN, + stakeMsg.txTag, + user, + stakeMsg.clientAddress, + 1 ether, + stakeMsg.amount + ); + + // delegation should fail + vm.expectEmit(true, true, true, true); + emit DelegationFailedForStake(UTXOGatewayStorage.ClientChainID.BITCOIN, user, operator, 1 ether); + + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RevertOnDepositFailure() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: "", + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + // mock Assets precompile deposit failure + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IAssets.depositLST.selector), abi.encode(false, 0) + ); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectRevert(abi.encodeWithSelector(Errors.DepositFailed.selector, bytes("tx1"))); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RevertWhenPaused() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: "", + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(owner); + gateway.pause(); + + vm.prank(relayer); + vm.expectRevert("Pausable: paused"); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RevertUnauthorizedWitness() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: "", + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + Player memory unauthorizedWitness = Player({addr: vm.addr(0x999), privateKey: 0x999}); + bytes memory signature = _generateSignature(stakeMsg, unauthorizedWitness.privateKey); + + vm.prank(unauthorizedWitness.addr); + vm.expectRevert(abi.encodeWithSelector(Errors.WitnessNotAuthorized.selector, unauthorizedWitness.addr)); + gateway.processStakeMessage(unauthorizedWitness.addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RevertInvalidStakeMessage() public { + _deactivateConsensus(); + + // Create invalid message with all zero values + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.NONE, + clientAddress: bytes(""), + exocoreAddress: address(0), + operator: "", + amount: 0, + nonce: 0, + txTag: bytes("") + }); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectRevert(Errors.InvalidStakeMessage.selector); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RevertZeroExocoreAddressBeforeRegistration() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: address(0), // Zero address + operator: "", + amount: 1 ether, + nonce: 1, + txTag: bytes("tx1") + }); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectRevert(Errors.ZeroAddress.selector); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_ProcessStakeMessage_RevertInvalidNonce() public { + _deactivateConsensus(); + + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddress, + exocoreAddress: user, + operator: "", + amount: 1 ether, + nonce: gateway.nextInboundNonce(UTXOGatewayStorage.ClientChainID.BITCOIN) + 1, + txTag: bytes("tx1") + }); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.prank(relayer); + vm.expectRevert( + abi.encodeWithSelector( + Errors.UnexpectedInboundNonce.selector, gateway.nextInboundNonce(stakeMsg.clientChainId), stakeMsg.nonce + ) + ); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + } + + function test_DelegateTo_Success() public { + // Setup: Register user's client chain address first + _mockRegisterAddress(user, btcAddress); + + // mock delegation precompile delegate success + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(true) + ); + + vm.prank(user); + vm.expectEmit(true, true, true, true); + emit DelegationCompleted(UTXOGatewayStorage.ClientChainID.BITCOIN, user, operator, 1 ether); + + gateway.delegateTo(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + + // Verify nonce increment + assertEq(gateway.delegationNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), 1); + } + + function test_DelegateTo_RevertZeroAmount() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(user); + vm.expectRevert(Errors.ZeroAmount.selector); + gateway.delegateTo(UTXOGatewayStorage.Token.BTC, operator, 0); + } + + function test_DelegateTo_RevertWhenPaused() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(owner); + gateway.pause(); + + vm.prank(user); + vm.expectRevert("Pausable: paused"); + gateway.delegateTo(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + } + + function test_DelegateTo_RevertNotRegistered() public { + // Don't register user's address + + vm.prank(user); + vm.expectRevert(Errors.AddressNotRegistered.selector); + gateway.delegateTo(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + } + + function test_DelegateTo_RevertInvalidOperator() public { + _mockRegisterAddress(user, btcAddress); + + string memory invalidOperator = "not-a-bech32-address"; + + vm.prank(user); + vm.expectRevert(Errors.InvalidOperator.selector); + gateway.delegateTo(UTXOGatewayStorage.Token.BTC, invalidOperator, 1 ether); + } + + function test_DelegateTo_RevertDelegationFailed() public { + _mockRegisterAddress(user, btcAddress); + + // Mock delegation failure + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(false) + ); + + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(Errors.DelegationFailed.selector)); + gateway.delegateTo(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + } + + function test_UndelegateFrom_Success() public { + // Setup: Register user's client chain address first + _mockRegisterAddress(user, btcAddress); + + // mock delegation precompile undelegate success + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.undelegate.selector), abi.encode(true) + ); + + vm.prank(user); + vm.expectEmit(true, true, true, true); + emit UndelegationCompleted(UTXOGatewayStorage.ClientChainID.BITCOIN, user, operator, 1 ether); + + gateway.undelegateFrom(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + + // Verify nonce increment + assertEq(gateway.delegationNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), 1); + } + + function test_UndelegateFrom_RevertZeroAmount() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(user); + vm.expectRevert(Errors.ZeroAmount.selector); + gateway.undelegateFrom(UTXOGatewayStorage.Token.BTC, operator, 0); + } + + function test_UndelegateFrom_RevertWhenPaused() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(owner); + gateway.pause(); + + vm.prank(user); + vm.expectRevert("Pausable: paused"); + gateway.undelegateFrom(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + } + + function test_UndelegateFrom_RevertNotRegistered() public { + // Don't register user's address + + vm.prank(user); + vm.expectRevert(Errors.AddressNotRegistered.selector); + gateway.undelegateFrom(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + } + + function test_UndelegateFrom_RevertInvalidOperator() public { + _mockRegisterAddress(user, btcAddress); + + string memory invalidOperator = "not-a-bech32-address"; + + vm.prank(user); + vm.expectRevert(Errors.InvalidOperator.selector); + gateway.undelegateFrom(UTXOGatewayStorage.Token.BTC, invalidOperator, 1 ether); + } + + function test_UndelegateFrom_RevertUndelegationFailed() public { + _mockRegisterAddress(user, btcAddress); + + // mock delegation precompile undelegate failure + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.undelegate.selector), abi.encode(false) + ); + + vm.prank(user); + vm.expectRevert(Errors.UndelegationFailed.selector); + gateway.undelegateFrom(UTXOGatewayStorage.Token.BTC, operator, 1 ether); + } + + function test_WithdrawPrincipal_Success() public { + // Setup: Register user's client chain address first + _mockRegisterAddress(user, btcAddress); + + // mock assets precompile withdrawLST success and return updated balance + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IAssets.withdrawLST.selector), abi.encode(true, 2 ether) + ); + + vm.prank(user); + vm.expectEmit(true, true, true, true); + emit WithdrawPrincipalRequested( + UTXOGatewayStorage.ClientChainID.BITCOIN, + 1, // first request ID + user, + btcAddress, + 1 ether, + 2 ether + ); + + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 1 ether); + + // Verify pegOutNonce increment + assertEq(gateway.pegOutNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), 1); + } + + function test_WithdrawPrincipal_RevertWhenPaused() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(owner); + gateway.pause(); + + vm.prank(user); + vm.expectRevert("Pausable: paused"); + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 1 ether); + } + + function test_WithdrawPrincipal_RevertZeroAmount() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(user); + vm.expectRevert(Errors.ZeroAmount.selector); + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 0); + } + + function test_WithdrawPrincipal_RevertWithdrawFailed() public { + _mockRegisterAddress(user, btcAddress); + + // mock assets precompile withdrawLST failure + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IAssets.withdrawLST.selector), abi.encode(false, 0) + ); + + vm.prank(user); + vm.expectRevert(Errors.WithdrawPrincipalFailed.selector); + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 1 ether); + } + + function test_WithdrawPrincipal_RevertNotRegistered() public { + // Don't register user's address + + vm.prank(user); + vm.expectRevert(Errors.AddressNotRegistered.selector); + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 1 ether); + } + + function test_WithdrawPrincipal_VerifyPegOutRequest() public { + _mockRegisterAddress(user, btcAddress); + + // mock Assets precompile withdrawLST success and return updated balance + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IAssets.withdrawLST.selector), abi.encode(true, 2 ether) + ); + + vm.prank(user); + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 1 ether); + + // Verify peg-out request details + UTXOGatewayStorage.PegOutRequest memory request = + gateway.getPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN, 1); + assertEq(uint8(request.clientChainId), uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)); + assertEq(request.nonce, 1); + assertEq(request.requester, user); + assertEq(request.clientAddress, btcAddress); + assertEq(request.amount, 1 ether); + assertEq(uint8(request.withdrawType), uint8(UTXOGatewayStorage.WithdrawType.WITHDRAW_PRINCIPAL)); + } + + function test_WithdrawReward_Success() public { + // Setup: Register user's client chain address first + _mockRegisterAddress(user, btcAddress); + + // mock Reward precompile claimReward success and return updated balance + vm.mockCall( + REWARD_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IReward.claimReward.selector), abi.encode(true, 2 ether) + ); + + vm.prank(user); + vm.expectEmit(true, true, true, true); + emit WithdrawRewardRequested( + UTXOGatewayStorage.ClientChainID.BITCOIN, + 1, // first request ID + user, + btcAddress, + 1 ether, + 2 ether + ); + + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 1 ether); + + // Verify pegOutNonce increment + assertEq(gateway.pegOutNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), 1); + } + + function test_WithdrawReward_RevertWhenPaused() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(owner); + gateway.pause(); + + vm.prank(user); + vm.expectRevert("Pausable: paused"); + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 1 ether); + } + + function test_WithdrawReward_RevertZeroAmount() public { + _mockRegisterAddress(user, btcAddress); + + vm.prank(user); + vm.expectRevert(Errors.ZeroAmount.selector); + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 0); + } + + function test_WithdrawReward_RevertClaimFailed() public { + _mockRegisterAddress(user, btcAddress); + + // mock claimReward failure + vm.mockCall( + REWARD_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IReward.claimReward.selector), abi.encode(false, 0) + ); + + vm.prank(user); + vm.expectRevert(Errors.WithdrawRewardFailed.selector); + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 1 ether); + } + + function test_WithdrawReward_RevertAddressNotRegistered() public { + // Don't register user's address - try to withdraw without registration + + vm.prank(user); + vm.expectRevert(Errors.AddressNotRegistered.selector); + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 1 ether); + } + + function test_WithdrawReward_VerifyPegOutRequest() public { + _mockRegisterAddress(user, btcAddress); + + // mock Reward precompile claimReward success and return updated balance + vm.mockCall( + REWARD_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IReward.claimReward.selector), abi.encode(true, 2 ether) + ); + + vm.prank(user); + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 1 ether); + + // Verify peg-out request details + UTXOGatewayStorage.PegOutRequest memory request = + gateway.getPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN, 1); + assertEq(uint8(request.clientChainId), uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)); + assertEq(request.nonce, 1); + assertEq(request.requester, user); + assertEq(request.clientAddress, btcAddress); + assertEq(request.amount, 1 ether); + assertEq(uint8(request.withdrawType), uint8(UTXOGatewayStorage.WithdrawType.WITHDRAW_REWARD)); + } + + function test_WithdrawReward_MultipleRequests() public { + _mockRegisterAddress(user, btcAddress); + + // Mock successful claimReward + bytes memory claimCall1 = abi.encodeWithSelector( + IReward.claimReward.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + user.toExocoreBytes(), + 1 ether + ); + vm.mockCall(REWARD_PRECOMPILE_ADDRESS, claimCall1, abi.encode(true, 2 ether)); + + bytes memory claimCall2 = abi.encodeWithSelector( + IReward.claimReward.selector, + uint32(uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)), + VIRTUAL_TOKEN, + user.toExocoreBytes(), + 0.5 ether + ); + vm.mockCall(REWARD_PRECOMPILE_ADDRESS, claimCall2, abi.encode(true, 1.5 ether)); + + vm.startPrank(user); + + // First withdrawal + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 1 ether); + + // Second withdrawal + gateway.withdrawReward(UTXOGatewayStorage.Token.BTC, 0.5 ether); + + vm.stopPrank(); + + // Verify both requests exist with correct details + UTXOGatewayStorage.PegOutRequest memory request1 = + gateway.getPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN, 1); + assertEq(request1.amount, 1 ether); + + UTXOGatewayStorage.PegOutRequest memory request2 = + gateway.getPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN, 2); + assertEq(request2.amount, 0.5 ether); + + // Verify nonce increment + assertEq(gateway.pegOutNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), 2); + } + + function test_ProcessNextPegOutRequest_Success() public { + // Setup: Create a peg-out request first + _setupPegOutRequest(); + + // Now consume the peg-out request + vm.prank(witnesses[0].addr); + vm.expectEmit(true, true, true, true); + emit PegOutRequestProcessing( + uint8(UTXOGatewayStorage.WithdrawType.WITHDRAW_PRINCIPAL), + UTXOGatewayStorage.ClientChainID.BITCOIN, + 1, // requestId + user, + btcAddress, + 1 ether + ); + + UTXOGatewayStorage.PegOutRequest memory request = + gateway.processNextPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN); + + // Verify returned request contents + assertEq(uint8(request.clientChainId), uint8(UTXOGatewayStorage.ClientChainID.BITCOIN)); + assertEq(request.nonce, 1); + assertEq(request.requester, user); + assertEq(request.clientAddress, btcAddress); + assertEq(request.amount, 1 ether); + assertEq(uint8(request.withdrawType), uint8(UTXOGatewayStorage.WithdrawType.WITHDRAW_PRINCIPAL)); + + // Verify outbound nonce increment + assertEq(gateway.outboundNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), 1); + } + + function test_ProcessNextPegOutRequest_RevertUnauthorizedWitness() public { + // Setup a peg-out request + _setupPegOutRequest(); + + address unauthorizedWitness = address(0x9999); + vm.prank(unauthorizedWitness); + vm.expectRevert(Errors.UnauthorizedWitness.selector); + gateway.processNextPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN); + } + + function test_ProcessNextPegOutRequest_RevertWhenPaused() public { + // Setup a peg-out request + _setupPegOutRequest(); + + vm.prank(owner); + gateway.pause(); + + vm.prank(witnesses[0].addr); + vm.expectRevert("Pausable: paused"); + gateway.processNextPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN); + } + + function test_ProcessNextPegOutRequest_RevertRequestNotFound() public { + // Don't create any peg-out request + vm.prank(witnesses[0].addr); + vm.expectRevert(abi.encodeWithSelector(Errors.RequestNotFound.selector, 1)); + gateway.processNextPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN); + } + + // Helper function to setup a peg-out request + function _setupPegOutRequest() internal { + if (gateway.getClientAddress(UTXOGatewayStorage.ClientChainID.BITCOIN, user).length == 0) { + _mockRegisterAddress(user, btcAddress); + } + + // mock withdrawLST success + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IAssets.withdrawLST.selector), abi.encode(true, 2 ether) + ); + + vm.prank(user); + gateway.withdrawPrincipal(UTXOGatewayStorage.Token.BTC, 1 ether); + assertEq(gateway.getPegOutRequest(UTXOGatewayStorage.ClientChainID.BITCOIN, 1).amount, 1 ether); + } + + // Helper functions + function _mockRegisterAddress(address exocoreAddr, bytes memory btcAddr) internal { + UTXOGatewayStorage.StakeMsg memory stakeMsg = UTXOGatewayStorage.StakeMsg({ + clientChainId: UTXOGatewayStorage.ClientChainID.BITCOIN, + clientAddress: btcAddr, + exocoreAddress: exocoreAddr, + operator: "", + amount: 1 ether, + nonce: gateway.nextInboundNonce(UTXOGatewayStorage.ClientChainID.BITCOIN), + txTag: bytes("tx1") + }); + + // mock Assets precompile deposit success and Delegation precompile delegate success + vm.mockCall( + ASSETS_PRECOMPILE_ADDRESS, + abi.encodeWithSelector(IAssets.depositLST.selector), + abi.encode(true, stakeMsg.amount) + ); + vm.mockCall( + DELEGATION_PRECOMPILE_ADDRESS, abi.encodeWithSelector(IDelegation.delegate.selector), abi.encode(true) + ); + + bytes memory signature = _generateSignature(stakeMsg, witnesses[0].privateKey); + + vm.expectEmit(true, true, true, true, address(gateway)); + emit AddressRegistered(UTXOGatewayStorage.ClientChainID.BITCOIN, btcAddr, exocoreAddr); + + vm.prank(relayer); + gateway.processStakeMessage(witnesses[0].addr, stakeMsg, signature); + + // Verify address registration + assertEq(gateway.getClientAddress(UTXOGatewayStorage.ClientChainID.BITCOIN, exocoreAddr), btcAddr); + assertEq(gateway.getExocoreAddress(UTXOGatewayStorage.ClientChainID.BITCOIN, btcAddr), exocoreAddr); + } + + function _addAllWitnesses() internal { + address[] memory witnessesToAdd = new address[](1); + for (uint256 i = 0; i < witnesses.length; i++) { + if (!gateway.authorizedWitnesses(witnesses[i].addr)) { + witnessesToAdd[0] = witnesses[i].addr; + vm.prank(owner); + gateway.addWitnesses(witnessesToAdd); + } + } + } + + function _getMessageHash(UTXOGatewayStorage.StakeMsg memory msg_) internal pure returns (bytes32) { + return keccak256( + abi.encode( + msg_.clientChainId, // ClientChainID + msg_.clientAddress, // bytes - Bitcoin address + msg_.exocoreAddress, // address + msg_.operator, // string + msg_.amount, // uint256 + msg_.nonce, // uint64 + msg_.txTag // bytes + ) + ); + } + + function _generateSignature(UTXOGatewayStorage.StakeMsg memory msg_, uint256 privateKey) + internal + pure + returns (bytes memory) + { + // Encode all fields of StakeMsg in order + bytes32 messageHash = _getMessageHash(msg_); + + // Sign the encoded message hash + (uint8 v, bytes32 r, bytes32 s) = vm.sign(privateKey, messageHash.toEthSignedMessageHash()); + + // Return the signature in the format expected by the contract + return abi.encodePacked(r, s, v); + } + + function _activateConsensus() internal { + vm.startPrank(owner); + gateway.updateRequiredProofs(gateway.authorizedWitnessCount()); + vm.stopPrank(); + } + + function _deactivateConsensus() internal { + vm.startPrank(owner); + gateway.updateRequiredProofs(gateway.authorizedWitnessCount() + 1); + vm.stopPrank(); + } + +} diff --git a/test/hardhat/client-chain/deploy_fixture.js b/test/hardhat/client-chain/deploy_fixture.js deleted file mode 100644 index c7d4541d..00000000 --- a/test/hardhat/client-chain/deploy_fixture.js +++ /dev/null @@ -1,93 +0,0 @@ -require("dotenv").config(); - -const exocoreChainId = 0; -const clientChainId = 101; -const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; - -async function deployFixture() { - const [deployer, exocoreValidatorSet, depositor] = await ethers.getSigners(); - - const {ERC20TokenContract, lzEndpointMockContract} = await prepareEnvironment(exocoreValidatorSet); - - const proxyAdmin = await ethers.getContractFactory("ProxyAdmin"); - const proxyAdminContract = await proxyAdmin.connect(deployer).deploy(); - await proxyAdminContract.waitForDeployment(); - - console.log("start deploying gateway logic contract") - const gatewayLogic = await ethers.getContractFactory("ClientChainGateway"); - const gatewayLogicContract = await gatewayLogic.connect(deployer).deploy(); - await gatewayLogicContract.waitForDeployment(); - - console.log("start deploying gateway proxy contract") - const gatewayProxy = await ethers.getContractFactory("TransparentUpgradeableProxy"); - const gatewayProxyContract = await gatewayProxy.connect(deployer).deploy( - gatewayLogicContract.target, - proxyAdminContract.target, - gatewayLogicContract.interface.encodeFunctionData( - "initialize", - [ - exocoreValidatorSet.address, - [ ERC20TokenContract.target ], - lzEndpointMockContract.target, - exocoreChainId - ] - ) - ); - await gatewayProxyContract.waitForDeployment(); - const gatewayContract = gatewayLogicContract.attach(gatewayProxyContract.target); - console.log("finish deploying gateway proxy contract"); - - console.log("start deploying vault logic contract") - const vaultLogic = await ethers.getContractFactory("Vault"); - const vaultLogicContract = await vaultLogic.connect(deployer).deploy(); - await vaultLogicContract.waitForDeployment(); - - console.log("start deploying vault proxy contract") - const vaultProxy = await ethers.getContractFactory("TransparentUpgradeableProxy"); - const vaultProxyContract = await vaultProxy.connect(deployer).deploy( - vaultLogicContract.target, - proxyAdminContract.target, - vaultLogicContract.interface.encodeFunctionData( - "initialize", - [ - ERC20TokenContract.target, - gatewayContract.target - ] - ) - ); - await vaultProxyContract.waitForDeployment(); - const vaultContract = vaultLogicContract.attach(vaultProxyContract.target); - - console.log("add vaults to gateway") - await gatewayContract.connect(exocoreValidatorSet).addTokenVaults([vaultContract.target]); - - return { - ERC20TokenContract, - lzEndpointMockContract, - proxyAdminContract, - gatewayContract, - vaultContract, - deployer, - exocoreValidatorSet, - depositor - } -} - -async function prepareEnvironment(exocoreValidatorSet) { - const ERC20Token = await ethers.getContractFactory("ERC20PresetFixedSupply"); - const ERC20TokenContract = await ERC20Token.deploy( - "rest", - "rest", - 1e8, - exocoreValidatorSet.address - ); - await ERC20TokenContract.waitForDeployment(); - - const lzEndpointMock = await ethers.getContractFactory("NonShortCircuitLzEndpointMock"); - const lzEndpointMockContract = await lzEndpointMock.deploy(clientChainId); - await lzEndpointMockContract.waitForDeployment(); - - return {ERC20TokenContract, lzEndpointMockContract}; -} - -module.exports = { deployFixture, exocoreChainId, clientChainId }; diff --git a/test/hardhat/client-chain/gateway.test.js b/test/hardhat/client-chain/gateway.test.js deleted file mode 100644 index 14419aa0..00000000 --- a/test/hardhat/client-chain/gateway.test.js +++ /dev/null @@ -1,12 +0,0 @@ -const { expect } = require("chai"); -const { loadFixture, } = require("@nomicfoundation/hardhat-toolbox/network-helpers"); -const { deployFixture } = require("./deploy_fixture.js"); - -describe("Gateway Contract", function() { - describe("Deployment", function() { - it("Should deploy successfully", async function() { - const fixture = await loadFixture(deployFixture); - }) - }) -}) - diff --git a/test/hardhat/exocore/deploy_fixture.js b/test/hardhat/exocore/deploy_fixture.js deleted file mode 100644 index 9c96bc8f..00000000 --- a/test/hardhat/exocore/deploy_fixture.js +++ /dev/null @@ -1,56 +0,0 @@ -require("dotenv").config(); - -const exocoreChainId = 0; -const clientChainId = 101; - -async function deployFixture() { - const [deployer, exocoreValidatorSet, depositor] = await ethers.getSigners(); - - const lzEndpointMockContract = await prepareEnvironment(exocoreValidatorSet); - - const proxyAdmin = await ethers.getContractFactory("ProxyAdmin"); - const proxyAdminContract = await proxyAdmin.connect(deployer).deploy(); - await proxyAdminContract.waitForDeployment(); - - console.log("start deploying gateway logic contract") - const gatewayLogic = await ethers.getContractFactory("ExocoreGateway"); - const gatewayLogicContract = await gatewayLogic.connect(deployer).deploy(); - await gatewayLogicContract.waitForDeployment(); - - console.log("start deploying gateway proxy contract") - const gatewayProxy = await ethers.getContractFactory("TransparentUpgradeableProxy"); - const gatewayProxyContract = await gatewayProxy.connect(deployer).deploy( - gatewayLogicContract.target, - proxyAdminContract.target, - gatewayLogicContract.interface.encodeFunctionData( - "initialize", - [ - exocoreValidatorSet.address, - lzEndpointMockContract.target, - ] - ) - ); - await gatewayProxyContract.waitForDeployment(); - const gatewayContract = gatewayLogicContract.attach(gatewayProxyContract.target); - console.log("finish deploying gateway proxy contract"); - console.log("gateway contract address:", gatewayProxyContract.target); - - return { - lzEndpointMockContract, - proxyAdminContract, - gatewayContract, - deployer, - exocoreValidatorSet, - depositor - } -} - -async function prepareEnvironment(exocoreValidatorSet) { - const lzEndpointMock = await ethers.getContractFactory("NonShortCircuitLzEndpointMock"); - const lzEndpointMockContract = await lzEndpointMock.deploy(clientChainId); - await lzEndpointMockContract.waitForDeployment(); - - return lzEndpointMockContract; -} - -module.exports = { deployFixture, exocoreChainId, clientChainId }; diff --git a/test/hardhat/exocore/gateway.test.js b/test/hardhat/exocore/gateway.test.js deleted file mode 100644 index 14419aa0..00000000 --- a/test/hardhat/exocore/gateway.test.js +++ /dev/null @@ -1,12 +0,0 @@ -const { expect } = require("chai"); -const { loadFixture, } = require("@nomicfoundation/hardhat-toolbox/network-helpers"); -const { deployFixture } = require("./deploy_fixture.js"); - -describe("Gateway Contract", function() { - describe("Deployment", function() { - it("Should deploy successfully", async function() { - const fixture = await loadFixture(deployFixture); - }) - }) -}) - diff --git a/test/hardhat/integration/btc-stake-e2e.test.js b/test/hardhat/integration/btc-stake-e2e.test.js new file mode 100644 index 00000000..bc54a9d8 --- /dev/null +++ b/test/hardhat/integration/btc-stake-e2e.test.js @@ -0,0 +1,365 @@ +const bitcoin = require('bitcoinjs-lib'); +const ecc = require('tiny-secp256k1'); +const { ECPairFactory } = require('ecpair'); +const axios = require('axios'); +const { expect } = require("chai"); +const fs = require('fs'); +const path = require('path'); +require("dotenv").config(); + +const ECPair = ECPairFactory(ecc); + +const ASSETS_PRECOMPILE_ADDRESS = "0x0000000000000000000000000000000000000804"; +const VIRTUAL_BTC_ADDR = "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"; +const BTC_ID = ethers.getBytes(VIRTUAL_BTC_ADDR); + +const BITCOIN_FAUCET_PRIVATE_KEY = process.env.TEST_ACCOUNT_THREE_PRIVATE_KEY; +const BITCOIN_ESPLORA_API_URL = process.env.BITCOIN_ESPLORA_API_URL; +const BITCOIN_VAULT_ADDRESS = process.env.BITCOIN_VAULT_ADDRESS; + +if (!BITCOIN_ESPLORA_API_URL || !BITCOIN_FAUCET_PRIVATE_KEY || !BITCOIN_VAULT_ADDRESS) { + throw new Error('BITCOIN_ESPLORA_API_URL or TEST_ACCOUNT_THREE_PRIVATE_KEY or BITCOIN_VAULT_ADDRESS is not set'); +} + +async function waitForBitcoinConfirmation(txid, confirmations = 1) { + while (true) { + try { + const response = await axios.get(`${BITCOIN_ESPLORA_API_URL}/api/tx/${txid}`); + if (response.data.confirmations >= confirmations) { + return response.data; + } + } catch (error) { + console.log('Waiting for transaction confirmation...'); + } + await new Promise(resolve => setTimeout(resolve, 1000)); + } +} + +async function fundBitcoinAddress(recipientAddress, amount) { + if (!recipientAddress) { + throw new Error('Recipient address is not set'); + } + + // Create Bitcoin key pairs + const faucetKeyPair = ECPair.fromPrivateKey( + Buffer.from(BITCOIN_FAUCET_PRIVATE_KEY.replace('0x', ''), 'hex'), + { network: bitcoin.networks.regtest, compressed: true } + ); + + // Create payment objects + const faucetPayment = bitcoin.payments.p2wpkh({ + pubkey: faucetKeyPair.publicKey, + network: bitcoin.networks.regtest + }); + + console.log('Funding from address:', faucetPayment.address); + console.log('Funding to address:', recipientAddress); + + try { + // Fetch UTXOs from faucet + const response = await axios.get(`${BITCOIN_ESPLORA_API_URL}/api/address/${faucetPayment.address}/utxo`); + const utxos = response.data; + + if (utxos.length === 0) { + throw new Error('No UTXOs found in faucet'); + } + + // Create funding transaction + const psbt = new bitcoin.Psbt({ network: bitcoin.networks.regtest }); + + // Add inputs + let totalInput = 0; + for (const utxo of utxos) { + psbt.addInput({ + hash: utxo.txid, + index: utxo.vout, + witnessUtxo: { + script: faucetPayment.output, + value: utxo.value + } + }); + + totalInput += utxo.value; + if (totalInput >= amount * 100000000) break; + } + + if (totalInput < amount * 100000000) { + throw new Error('Insufficient funds in faucet'); + } + + // Add recipient output + psbt.addOutput({ + address: recipientAddress, + value: Math.floor(amount * 100000000) + }); + + // Add change output + const fee = 1000; + const change = totalInput - (amount * 100000000) - fee; + if (change > 546) { + psbt.addOutput({ + address: faucetPayment.address, + value: change + }); + } + + // Sign and finalize + psbt.signAllInputs(faucetKeyPair); + psbt.finalizeAllInputs(); + + // Broadcast transaction + const tx = psbt.extractTransaction(); + const broadcastResponse = await axios.post( + `${BITCOIN_ESPLORA_API_URL}/api/tx`, + tx.toHex(), + { headers: { 'Content-Type': 'text/plain' } } + ); + + console.log('Funding transaction broadcasted:', broadcastResponse.data); + + // Wait for confirmation + await waitForBitcoinConfirmation(broadcastResponse.data); + console.log('Funding transaction confirmed'); + + return broadcastResponse.data; + } catch (error) { + console.error('Funding error:', error.message); + throw error; + } +} + +async function createStakingTransaction(stakerPrivateKey, vaultAddress, depositAmount) { + if (!stakerPrivateKey || !vaultAddress) { + throw new Error('Required parameters are not set'); + } + + try { + // Create Bitcoin key pair from private key + const privateKeyBuffer = Buffer.from(stakerPrivateKey.replace('0x', ''), 'hex'); + const keyPair = ECPair.fromPrivateKey(privateKeyBuffer, { + network: bitcoin.networks.regtest, + compressed: true + }); + + // Create payment object for source address + const payment = bitcoin.payments.p2wpkh({ + pubkey: keyPair.publicKey, + network: bitcoin.networks.regtest + }); + + // Get source address + const sourceAddress = payment.address; + console.log('Bitcoin source address:', sourceAddress); + + // Derive EVM address from same private key + const wallet = new ethers.Wallet(stakerPrivateKey); + const evmAddress = wallet.address.slice(2); // Remove '0x' prefix + console.log('EVM address:', '0x' + evmAddress); + + // Fetch UTXOs + const response = await axios.get(`${BITCOIN_ESPLORA_API_URL}/api/address/${sourceAddress}/utxo`); + const utxos = response.data; + + if (utxos.length === 0) { + throw new Error('No UTXOs found'); + } + + // Create transaction + const psbt = new bitcoin.Psbt({ network: bitcoin.networks.regtest }); + + // Add inputs + let totalInput = 0; + for (const utxo of utxos) { + psbt.addInput({ + hash: utxo.txid, + index: utxo.vout, + witnessUtxo: { + script: payment.output, + value: utxo.value + } + }); + + totalInput += utxo.value; + if (totalInput >= depositAmount * 100000000) break; + } + + if (totalInput < depositAmount * 100000000) { + throw new Error('Insufficient funds'); + } + + // Add OP_RETURN output with EVM address + const opReturnScript = bitcoin.script.compile([ + bitcoin.opcodes.OP_RETURN, + Buffer.from(evmAddress, 'hex') + ]); + + psbt.addOutput({ + script: opReturnScript, + value: 0 + }); + + // Add vault address output + psbt.addOutput({ + address: vaultAddress, + value: Math.floor(depositAmount * 100000000) + }); + + // Add change output if needed + const fee = 1000; // 1000 satoshis fee + const change = totalInput - (depositAmount * 100000000) - fee; + if (change > 546) { // dust threshold + psbt.addOutput({ + address: sourceAddress, + value: change + }); + } + + // Sign all inputs + psbt.signAllInputs(keyPair); + psbt.finalizeAllInputs(); + + // Get transaction hex + const tx = psbt.extractTransaction(); + console.log('Transaction hex:', tx.toHex()); + + // Broadcast transaction + const broadcastResponse = await axios.post( + `${BITCOIN_ESPLORA_API_URL}/api/tx`, + tx.toHex(), + { headers: { 'Content-Type': 'text/plain' } } + ); + + console.log('Transaction broadcasted:', broadcastResponse.data); + return broadcastResponse.data; // txid + } catch (error) { + console.error('Error:', error.message); + throw error; + } +} + +describe("Bitcoin Staking E2E Test", function() { + let utxoGateway; + let assetsPrecompile; + let staker; + let vault; + + const depositAmount = 0.01; // BTC + const CLIENT_CHAIN = { + NONE: 0, + BTC: 1, + }; + + before(async function() { + // Load deployed contracts + const deployedContracts = JSON.parse( + fs.readFileSync( + path.join(__dirname, '../../../script/deployments/deployedContracts.json'), + 'utf8' + ) + ); + + // Get signers + signers = await ethers.getSigners(); + staker = signers[signers.length - 2]; + vault = signers[signers.length - 1]; + console.log('Staker address:', staker.address); + console.log('Vault address:', vault.address); + + // Initialize contracts from deployed addresses + utxoGateway = await ethers.getContractAt( + "UTXOGateway", + deployedContracts.UTXOGateway.proxy + ); + assetsPrecompile = await ethers.getContractAt( + "IAssets", + ASSETS_PRECOMPILE_ADDRESS + ); + + // Verify UTXOGateway is properly set up + const [success, authorized] = await assetsPrecompile.isAuthorizedGateway(utxoGateway.target); + expect(success).to.be.true; + expect(authorized).to.be.true; + + // Verify BTC staking is activated + const [chainSuccess, chainInfo] = await assetsPrecompile.getClientChainInfo(CLIENT_CHAIN.BTC); + expect(chainSuccess).to.be.true; + expect(chainInfo.isRegistered).to.be.true; + + // Fund staker's Bitcoin address with test BTC + console.log('Funding staker address with test BTC...'); + const fundingAmount = 0.1; // Fund with more than needed for the test + await fundBitcoinAddress(await staker.privateKey, fundingAmount); + console.log('Staker address funded successfully'); + }); + + it("should complete the full staking flow", async function() { + // Get initial balance + const [success, initialBalance] = await assetsPrecompile.getStakerBalanceByToken( + CLIENT_CHAIN.BTC, + ethers.getBytes(staker.address), + BTC_ID + ); + + // Create and broadcast the Bitcoin transaction + const txid = await createStakingTransaction( + staker.privateKey, + BITCOIN_VAULT_ADDRESS, + depositAmount + ); + console.log('Staking transaction broadcasted. TXID:', txid); + + // Wait for Bitcoin confirmation + console.log('Waiting for Bitcoin confirmation...'); + const confirmedTx = await waitForBitcoinConfirmation(txid); + console.log('Transaction confirmed with', confirmedTx.confirmations, 'confirmations'); + + // Wait for DepositCompleted event + console.log('Waiting for DepositCompleted event...'); + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + reject(new Error('Timeout waiting for DepositCompleted event')); + }, 60000); + + utxoGateway.on('DepositCompleted', async ( + clientChainId, + txTag, + depositorExoAddr, + depositorClientChainAddr, + amount, + updatedBalance + ) => { + try { + if (depositorExoAddr.toLowerCase() === staker.address.toLowerCase()) { + clearTimeout(timeout); + + // Verify final balance + const [finalSuccess, finalBalance] = await assetsPrecompile.getStakerBalanceByToken( + CLIENT_CHAIN.BTC, + ethers.getBytes(staker.address), + BTC_ID + ); + + expect(finalSuccess).to.be.true; + const expectedIncrease = ethers.parseUnits('0.01', 8); // 0.01 BTC in satoshis + + // Check balance components + expect(finalBalance[0]).to.equal(CLIENT_CHAIN.BTC); // clientChainID + expect(ethers.hexlify(finalBalance[1])).to.equal(ethers.hexlify(staker.address)); // stakerAddress + expect(ethers.hexlify(finalBalance[2])).to.equal(ethers.hexlify(BTC_ID)); // tokenId + expect(finalBalance[3]).to.equal(expectedIncrease); // balance + expect(finalBalance[7]).to.equal(expectedIncrease); // totalDeposited + + console.log('Deposit completed successfully'); + console.log('Initial balance:', initialBalance ? initialBalance[3] : 0); + console.log('Final balance:', finalBalance[3].toString()); + + resolve(); + } + } catch (error) { + clearTimeout(timeout); + reject(error); + } + }); + }); + }).timeout(120000); +}); \ No newline at end of file diff --git a/test/hardhat/integration/btc-stake.test.js b/test/hardhat/integration/btc-stake.test.js new file mode 100644 index 00000000..0244e090 --- /dev/null +++ b/test/hardhat/integration/btc-stake.test.js @@ -0,0 +1,248 @@ +const { expect } = require("chai"); +require("dotenv").config(); + +describe("BTC Stake", () => { + let proxyAdmin; + let utxoGateway; + let utxoGatewayLogic; + let assetsPrecompile; + let faucet; + let deployer; + let owner; + let relayer; + let staker; + let witness1; + let witness2; + let witness3; + + const ASSETS_PRECOMPILE_ADDRESS = "0x0000000000000000000000000000000000000804"; + const STAKER_BTC_ADDR = "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"; + + // enum representing client chain + const CLIENT_CHAIN = { + NONE: 0, + BTC: 1, + }; + + // enum representing tokens + const TOKEN = { + NONE: 0, + BTC: 1, + }; + + const TX_STATUS = { + NotStartedOrProcessed: 0, // 0: Default state - transaction hasn't started collecting proofs + Pending: 1, // 1: Currently collecting witness proofs + Expired: 2, // 2: Failed due to timeout, but can be retried + }; + + const VIRTUAL_BTC_ADDR = "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"; + const BTC_ID = ethers.getBytes(VIRTUAL_BTC_ADDR); + const OPERATOR = "exo18cggcpvwspnd5c6ny8wrqxpffj5zmhklprtnph"; + + // Run once before all tests + before(async () => { + const initialAccounts = await ethers.getSigners(); + [deployer, owner, relayer, staker, witness1, witness2, witness3] = initialAccounts; + + // deployer is also the faucet + faucet = deployer; + + // transfer 1 ether gas tokens to all accounts + for (const account of initialAccounts) { + const tx = await faucet.sendTransaction({ + to: account.address, + value: ethers.parseEther("1"), + }); + // wait until the transaction is mined but should not exceed 10 seconds + await tx.wait(); + expect(await ethers.provider.getBalance(account.address)).to.be.greaterThanOrEqual(ethers.parseEther("1")); + } + + // Deploy and initialize UTXOGateway only if contract hasn't been deployed yet + if (!utxoGateway) { + // deploy the logic contract + const utxoGatewayFactory = await ethers.getContractFactory("UTXOGateway"); + utxoGatewayLogic = await utxoGatewayFactory.connect(deployer).deploy(); + await utxoGatewayLogic.waitForDeployment(); + + // deploy the proxy admin contract + const proxyAdminFactory = await ethers.getContractFactory("ProxyAdmin"); + proxyAdmin = await proxyAdminFactory.connect(deployer).deploy(); + await proxyAdmin.waitForDeployment(); + + // deploy the proxy contract + const proxyFactory = await ethers.getContractFactory("TransparentUpgradeableProxy"); + const utxoGatewayProxy = await proxyFactory.deploy( + utxoGatewayLogic.target, + proxyAdmin.target, + utxoGatewayLogic.interface.encodeFunctionData("initialize", [owner.address, [witness1.address, witness2.address, witness3.address], 2]) + ); + await utxoGatewayProxy.waitForDeployment(); + + // set the proxy address to the UTXOGateway interface + utxoGateway = utxoGatewayFactory.attach(utxoGatewayProxy.target); + } + + // set the utxo gateway as authorized + assetsPrecompile = await ethers.getContractAt("IAssets", ASSETS_PRECOMPILE_ADDRESS); + const tx = await assetsPrecompile.connect(deployer).updateAuthorizedGateways([utxoGateway.target]); + const receipt = await tx.wait(); + expect(receipt.status).to.be.equal(1); + }); + + it("should deploy the contract and successfully set the utxo gateway as authorized", async () => { + expect(utxoGateway.target).to.be.properAddress; + console.log("UTXOGateway deployed to:", utxoGateway.target); + + // assert owner is set + expect(await utxoGateway.owner()).to.equal(owner.address); + + // assert witnesses are set + expect(await utxoGateway.authorizedWitnesses(witness1.address)).to.be.true; + expect(await utxoGateway.authorizedWitnesses(witness2.address)).to.be.true; + expect(await utxoGateway.authorizedWitnesses(witness3.address)).to.be.true; + + // assert threshold is set + expect(await utxoGateway.requiredProofs()).to.equal(2); + expect(await utxoGateway.isConsensusRequired()).to.be.true; + + // assert the utxo gateway is authorized + const [success, authorized] = await assetsPrecompile.isAuthorizedGateway(utxoGateway.target); + expect(success).to.be.true; + expect(authorized).to.be.true; + }); + + it("should successfully activate staking for BTC", async () => { + const tx = await utxoGateway.connect(owner).activateStakingForClientChain(CLIENT_CHAIN.BTC); + const receipt = await tx.wait(); + expect(receipt.status).to.be.equal(1); + + // assert the client chain is registered + const [success1, registered] = await assetsPrecompile.isRegisteredClientChain(CLIENT_CHAIN.BTC); + expect(success1).to.be.true; + expect(registered).to.be.true; + + // assert the BTC asset is registered + const [success2, tokenInfo] = await assetsPrecompile.getTokenInfo(CLIENT_CHAIN.BTC, BTC_ID); + expect(success2).to.be.true; + // Access array elements directly since tokenInfo is returned as an array + expect(tokenInfo[0]).to.equal("BTC"); // name + expect(tokenInfo[1]).to.equal(""); // symbol + expect(Number(tokenInfo[2])).to.equal(CLIENT_CHAIN.BTC); // clientChainId + + // Convert the returned tokenId bytes to hex string for comparison + const returnedTokenId = ethers.hexlify(tokenInfo[3]); // tokenId + expect(returnedTokenId).to.equal(ethers.hexlify(BTC_ID)); + expect(Number(tokenInfo[4])).to.equal(8); // decimals + expect(Number(tokenInfo[5])).to.equal(0); // totalStaked + }); + + it("should successfully stake BTC", async () => { + // construct the stake message for staker + const stakeMsg = { + clientChainId: CLIENT_CHAIN.BTC, // enum value, probably 1 + clientAddress: ethers.toUtf8Bytes(STAKER_BTC_ADDR), // convert address to bytes + exocoreAddress: staker.address, // use signer's address + operator: OPERATOR, + amount: ethers.parseUnits("1.0", 8), + nonce: BigInt(1), + txTag: ethers.toUtf8Bytes("test-1") + }; + + // Create the message hash using the same format as the contract + const messageHash = ethers.keccak256( + ethers.AbiCoder.defaultAbiCoder().encode( + [ + 'uint8', // clientChainId (enum is uint8) + 'bytes', // clientAddress + 'address', // exocoreAddress + 'string', // operator + 'uint256', // amount + 'uint64', // nonce + 'bytes' // txTag + ], + [ + stakeMsg.clientChainId, + stakeMsg.clientAddress, + stakeMsg.exocoreAddress, + stakeMsg.operator, + stakeMsg.amount, + stakeMsg.nonce, + stakeMsg.txTag + ] + ) + ); + + // construct proofs for the stake message, with each witness signing the message + const proofs = []; + for (const witness of [witness1, witness2, witness3]) { + const proof = await witness.signMessage(ethers.getBytes(messageHash)); + proofs.push(proof); + } + + // consensus is required, so we need to submit the proofs + expect(await utxoGateway.isConsensusRequired()).to.be.true; + expect(await utxoGateway.requiredProofs()).to.equal(2); + + // check initial balance, since we have not deposited any BTC yet, the call should fail + const [success, _] = await assetsPrecompile.getStakerBalanceByToken( + CLIENT_CHAIN.BTC, + ethers.getBytes(staker.address), + BTC_ID + ); + expect(success).to.be.false; + + // submit the first proof + const tx = await utxoGateway.connect(relayer).submitProofForStakeMsg( + witness1.address, + stakeMsg, + proofs[0] + ); + + // Wait for transaction with more details + const receipt1 = await tx.wait(); + expect(receipt1.status).to.be.equal(1); + + // assert the transaction is created and pending to be processed + expect(await utxoGateway.getTransactionStatus(messageHash)).to.equal(TX_STATUS.Pending); + expect(await utxoGateway.getTransactionProofCount(messageHash)).to.equal(1); + + // Check balance after first proof - should fail since we have not reached consensus to process the transaction + const [midSuccess, midBalance] = await assetsPrecompile.getStakerBalanceByToken( + CLIENT_CHAIN.BTC, + ethers.getBytes(staker.address), + BTC_ID + ); + expect(midSuccess).to.be.false; + + // submit the second proof + const tx2 = await utxoGateway.connect(relayer).submitProofForStakeMsg(witness2.address, stakeMsg, proofs[1]); + const receipt2 = await tx2.wait(); + expect(receipt2.status).to.be.equal(1); + // assert we should have met with required proofs to process the transaction + expect(await utxoGateway.getTransactionStatus(messageHash)).to.equal(TX_STATUS.NotStartedOrProcessed); + expect(await utxoGateway.getTransactionProofCount(messageHash)).to.equal(0); + + // Check final balance - should reflect the staked amount + const [finalSuccess, finalBalance] = await assetsPrecompile.getStakerBalanceByToken( + CLIENT_CHAIN.BTC, + ethers.getBytes(staker.address), + BTC_ID + ); + expect(finalSuccess).to.be.true; + expect(finalBalance[0]).to.equal(CLIENT_CHAIN.BTC); // clientChainID + expect(ethers.hexlify(finalBalance[1])).to.equal(ethers.hexlify(staker.address)); // stakerAddress + expect(ethers.hexlify(finalBalance[2])).to.equal(ethers.hexlify(BTC_ID)); // tokenId + expect(finalBalance[3]).to.equal(stakeMsg.amount); // balance + expect(finalBalance[4]).to.equal(0n); // withdrawable should be zero since tokens would be delegated to operator + expect(finalBalance[5]).to.equal(stakeMsg.amount); // delegated + expect(finalBalance[6]).to.equal(0n); // pendingUndelegated + expect(finalBalance[7]).to.equal(stakeMsg.amount); // totalDeposited + + // Verify final transaction status + expect(await utxoGateway.getTransactionStatus(messageHash)).to.equal(TX_STATUS.NotStartedOrProcessed); + expect(await utxoGateway.getTransactionProofCount(messageHash)).to.equal(0); + + }); +}); diff --git a/test/mocks/AssetsMock.sol b/test/mocks/AssetsMock.sol index 6f041606..1cbcc09f 100644 --- a/test/mocks/AssetsMock.sol +++ b/test/mocks/AssetsMock.sol @@ -1,17 +1,25 @@ +// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +// import "forge-std/console.sol"; import {IAssets} from "src/interfaces/precompiles/IAssets.sol"; +import {TokenInfo} from "src/interfaces/precompiles/IAssets.sol"; +import {StakerBalance} from "src/interfaces/precompiles/IAssets.sol"; contract AssetsMock is IAssets { address constant VIRTUAL_STAKED_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; + address constant VIRTUAL_STAKED_BTC_ADDRESS = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; + uint32 internal constant clientBtcChainId = 111; mapping(uint32 => mapping(bytes => mapping(bytes => uint256))) public principalBalances; mapping(bytes => mapping(bytes => bool)) public inValidatorSet; + mapping(address => bool) public authorizedGateways; uint32[] internal chainIds; mapping(uint32 chainId => bool registered) public isRegisteredChain; mapping(uint32 chainId => mapping(bytes token => bool registered)) public isRegisteredToken; + mapping(uint32 chainId => mapping(bytes token => TokenInfo)) public registeredTokens; constructor(uint32 clientChainId) { isRegisteredChain[clientChainId] = true; @@ -25,12 +33,21 @@ contract AssetsMock is IAssets { uint256 opAmount ) external returns (bool success, uint256 latestAssetState) { require(assetsAddress.length == 32, "invalid asset address"); - require(stakerAddress.length == 32, "invalid staker address"); - require(bytes32(assetsAddress) != bytes32(bytes20(VIRTUAL_STAKED_ETH_ADDRESS)), "only support LST"); - require(isRegisteredToken[clientChainLzId][assetsAddress], "the token is not registered before"); - principalBalances[clientChainLzId][assetsAddress][stakerAddress] += opAmount; + if (clientChainLzId != clientBtcChainId) { + require(stakerAddress.length == 32, "invalid staker address"); + } + + // Validate the asset address + // If the assetsAddress is not the virtual ETH/BTC address, check if the token is registered + bool notEth = bytes32(assetsAddress) != bytes32(bytes20(VIRTUAL_STAKED_ETH_ADDRESS)); + bool notBtc = bytes32(assetsAddress) != bytes32(bytes20(VIRTUAL_STAKED_BTC_ADDRESS)); + if (notEth && notBtc) { + require(isRegisteredToken[clientChainLzId][assetsAddress], "the token not registered"); + } + + principalBalances[clientChainLzId][assetsAddress][stakerAddress] += opAmount; return (true, principalBalances[clientChainLzId][assetsAddress][stakerAddress]); } @@ -56,10 +73,13 @@ contract AssetsMock is IAssets { ) external returns (bool success, uint256 latestAssetState) { require(assetsAddress.length == 32, "invalid asset address"); require(withdrawer.length == 32, "invalid staker address"); - if (bytes32(assetsAddress) == bytes32(bytes20(VIRTUAL_STAKED_ETH_ADDRESS))) { - return (false, 0); - } - if (!isRegisteredToken[clientChainLzId][assetsAddress]) { + + bytes32 assetAddressBytes32 = bytes32(assetsAddress); + bool isEth = assetAddressBytes32 == bytes32(bytes20(VIRTUAL_STAKED_ETH_ADDRESS)); + bool isBtc = assetAddressBytes32 == bytes32(bytes20(VIRTUAL_STAKED_BTC_ADDRESS)); + + // Disallow ETH withdrawals or non-registered tokens (except BTC) + if (isEth || (!isRegisteredToken[clientChainLzId][assetsAddress] && !isBtc)) { return (false, 0); } @@ -126,6 +146,14 @@ contract AssetsMock is IAssets { return false; } isRegisteredToken[clientChainId][token] = true; + registeredTokens[clientChainId][token] = TokenInfo({ + name: name, + symbol: "", + clientChainID: clientChainId, + tokenID: token, + decimals: decimals, + totalStaked: 0 + }); return true; } @@ -146,6 +174,17 @@ contract AssetsMock is IAssets { return true; } + function updateAuthorizedGateways(address[] calldata gateways) external returns (bool) { + if (gateways.length == 0) { + return false; + } + + for (uint256 i = 0; i < gateways.length; i++) { + authorizedGateways[gateways[i]] = true; + } + return true; + } + function getPrincipalBalance(uint32 clientChainLzId, bytes memory token, bytes memory staker) public view @@ -162,4 +201,39 @@ contract AssetsMock is IAssets { return (true, isRegisteredChain[clientChainID]); } + function isAuthorizedGateway(address gateway) external view returns (bool, bool) { + return (true, authorizedGateways[gateway]); + } + + function getTokenInfo(uint32 clientChainId, bytes calldata tokenId) + external + view + returns (bool, TokenInfo memory) + { + if (!isRegisteredToken[clientChainId][tokenId]) { + return (false, TokenInfo("", "", 0, bytes(""), 0, 0)); + } + return (true, registeredTokens[clientChainId][tokenId]); + } + + function getStakerBalanceByToken(uint32 clientChainId, bytes calldata stakerAddress, bytes calldata token) + external + view + returns (bool, StakerBalance memory) + { + return ( + true, + StakerBalance( + clientChainId, + stakerAddress, + token, + principalBalances[clientChainId][token][stakerAddress], + principalBalances[clientChainId][token][stakerAddress], + 0, + 0, + principalBalances[clientChainId][token][stakerAddress] + ) + ); + } + } diff --git a/test/mocks/DelegationMock.sol b/test/mocks/DelegationMock.sol index 6ac85c3a..7fb508d1 100644 --- a/test/mocks/DelegationMock.sol +++ b/test/mocks/DelegationMock.sol @@ -6,7 +6,7 @@ import {AssetsMock} from "./AssetsMock.sol"; contract DelegationMock is IDelegation { - mapping(bytes => mapping(bytes => mapping(uint32 => mapping(bytes => uint256)))) public delegateTo; + mapping(bytes => mapping(bytes => mapping(uint32 => mapping(bytes => uint256)))) public delegateToRecords; mapping(uint32 clientChainId => mapping(bytes staker => bytes operator)) public stakerToOperator; mapping(uint32 chainId => bool registered) isRegisteredChain; @@ -41,7 +41,7 @@ contract DelegationMock is IDelegation { if (operatorAddr.length != 42) { return false; } - delegateTo[stakerAddress][operatorAddr][clientChainLzId][assetsAddress] += opAmount; + delegateToRecords[stakerAddress][operatorAddr][clientChainLzId][assetsAddress] += opAmount; emit DelegateRequestProcessed( clientChainLzId, lzNonce, assetsAddress, stakerAddress, string(operatorAddr), opAmount ); @@ -63,10 +63,10 @@ contract DelegationMock is IDelegation { if (operatorAddr.length != 42) { return false; } - if (opAmount > delegateTo[stakerAddress][operatorAddr][clientChainLzId][assetsAddress]) { + if (opAmount > delegateToRecords[stakerAddress][operatorAddr][clientChainLzId][assetsAddress]) { return false; } - delegateTo[stakerAddress][operatorAddr][clientChainLzId][assetsAddress] -= opAmount; + delegateToRecords[stakerAddress][operatorAddr][clientChainLzId][assetsAddress] -= opAmount; emit UndelegateRequestProcessed( clientChainLzId, lzNonce, assetsAddress, stakerAddress, string(operatorAddr), opAmount ); @@ -110,7 +110,7 @@ contract DelegationMock is IDelegation { view returns (uint256) { - return delegateTo[_addressToBytes(delegator)][bytes(operator)][clientChainLzId][_addressToBytes(token)]; + return delegateToRecords[_addressToBytes(delegator)][bytes(operator)][clientChainLzId][_addressToBytes(token)]; } function getAssociatedOperator(uint32 clientChainId, bytes calldata staker) @@ -125,4 +125,44 @@ contract DelegationMock is IDelegation { return abi.encodePacked(bytes32(bytes20(addr))); } + function delegateToThroughBtcGateway( + uint32 clientChainId, + bytes memory assetsAddress, + bytes memory stakerAddress, + bytes memory operatorAddr, + uint256 opAmount + ) external returns (bool success) { + require(assetsAddress.length == 32, "invalid asset address"); + require(stakerAddress.length == 32, "invalid staker address"); + require(operatorAddr.length == 42, "invalid operator address"); + delegateToRecords[stakerAddress][operatorAddr][clientChainId][assetsAddress] += opAmount; + uint64 Nonce = 1; + emit DelegateRequestProcessed( + clientChainId, Nonce, assetsAddress, stakerAddress, string(operatorAddr), opAmount + ); + return true; + } + + function undelegateFromThroughBtcGateway( + uint32 clientChainId, + bytes memory assetsAddress, + bytes memory stakerAddress, + bytes memory operatorAddr, + uint256 opAmount + ) external returns (bool success) { + require(assetsAddress.length == 32, "invalid asset address"); + require(stakerAddress.length == 32, "invalid staker address"); + require(operatorAddr.length == 42, "invalid operator address"); + require( + opAmount <= delegateToRecords[stakerAddress][operatorAddr][clientChainId][assetsAddress], "amount overflow" + ); + delegateToRecords[stakerAddress][operatorAddr][clientChainId][assetsAddress] -= opAmount; + uint64 lzNonce = 12; + emit UndelegateRequestProcessed( + clientChainId, lzNonce, assetsAddress, stakerAddress, string(operatorAddr), opAmount + ); + + return true; + } + } diff --git a/test/mocks/ExocoreGatewayMock.sol b/test/mocks/ExocoreGatewayMock.sol index 6e1b15ba..327a2d22 100644 --- a/test/mocks/ExocoreGatewayMock.sol +++ b/test/mocks/ExocoreGatewayMock.sol @@ -17,9 +17,9 @@ import { } from "src/lzApp/OAppUpgradeable.sol"; import {ExocoreGatewayStorage} from "src/storage/ExocoreGatewayStorage.sol"; -import {IOAppCore} from "@layerzero-v2/oapp/contracts/oapp/interfaces/IOAppCore.sol"; -import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; -import {ILayerZeroReceiver} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroReceiver.sol"; +import {IOAppCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; +import {OptionsBuilder} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; +import {ILayerZeroReceiver} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; diff --git a/test/mocks/NonShortCircuitLzEndpointMock.sol b/test/mocks/NonShortCircuitLzEndpointMock.sol deleted file mode 100644 index 4229e48c..00000000 --- a/test/mocks/NonShortCircuitLzEndpointMock.sol +++ /dev/null @@ -1,471 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 - -pragma solidity ^0.8.19; -pragma abicoder v2; - -import "@layerzero-contracts/interfaces/ILayerZeroEndpoint.sol"; -import "@layerzero-contracts/interfaces/ILayerZeroReceiver.sol"; -import "@layerzero-contracts/libraries/LzLib.sol"; - -/* -like a real LayerZero endpoint but can be mocked, which handle message transmission, verification, and receipt. -- blocking: LayerZero provides ordered delivery of messages from a given sender to a destination chain. -- non-reentrancy: endpoint has a non-reentrancy guard for both the send() and receive(), respectively. -- adapter parameters: allows UAs to add arbitrary transaction params in the send() function, like airdrop on destination -chain. -unlike a real LayerZero endpoint, it is -- no messaging library versioning -- send() will short circuit to lzReceive() -- no user application configuration*/ -contract NonShortCircuitLzEndpointMock is ILayerZeroEndpoint { - - uint8 internal constant _NOT_ENTERED = 1; - uint8 internal constant _ENTERED = 2; - - mapping(address => address) public lzEndpointLookup; - - uint16 public mockChainId; - bool public nextMsgBlocked; - - // fee config - RelayerFeeConfig public relayerFeeConfig; - ProtocolFeeConfig public protocolFeeConfig; - uint256 public oracleFee; - bytes public defaultAdapterParams; - - address exocoreValidatorSet; - - // path = remote addrss + local address - // inboundNonce = [srcChainId][path]. - mapping(uint16 => mapping(bytes => uint64)) public inboundNonce; - //todo: this is a hack - // outboundNonce = [dstChainId][srcAddress] - mapping(uint16 => mapping(address => uint64)) public outboundNonce; - // // outboundNonce = [dstChainId][path]. - // mapping(uint16 => mapping(bytes => uint64)) public outboundNonce; - // storedPayload = [srcChainId][path] - mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload; - // msgToDeliver = [srcChainId][path] - mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver; - - // reentrancy guard - uint8 internal _send_entered_state = 1; - uint8 internal _receive_entered_state = 1; - - struct ProtocolFeeConfig { - uint256 zroFee; - uint256 nativeBP; - } - - struct RelayerFeeConfig { - uint128 dstPriceRatio; // 10^10 - uint128 dstGasPriceInWei; - uint128 dstNativeAmtCap; - uint64 baseGas; - uint64 gasPerByte; - } - - struct StoredPayload { - uint64 payloadLength; - address dstAddress; - bytes32 payloadHash; - } - - struct QueuedPayload { - address dstAddress; - uint64 nonce; - bytes payload; - } - - modifier sendNonReentrant() { - require(_send_entered_state == _NOT_ENTERED, "LayerZeroMock: no send reentrancy"); - _send_entered_state = _ENTERED; - _; - _send_entered_state = _NOT_ENTERED; - } - - modifier receiveNonReentrant() { - require(_receive_entered_state == _NOT_ENTERED, "LayerZeroMock: no receive reentrancy"); - _receive_entered_state = _ENTERED; - _; - _receive_entered_state = _NOT_ENTERED; - } - - event UaForceResumeReceive(uint16 chainId, bytes srcAddress); - event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress); - event PayloadStored( - uint16 srcChainId, bytes srcAddress, address dstAddress, uint64 nonce, bytes payload, bytes reason - ); - event ValueTransferFailed(address indexed to, uint256 indexed quantity); - event Packet(uint16, address, address, uint64, bytes); - - constructor(uint16 _chainId, address _exocoreValidatorSet) { - require(_exocoreValidatorSet != address(0), "exocore validator set address should not be empty"); - mockChainId = _chainId; - - // init config - relayerFeeConfig = RelayerFeeConfig({ - dstPriceRatio: 1e10, // 1:1, same chain, same native coin - dstGasPriceInWei: 1e10, - dstNativeAmtCap: 1e19, - baseGas: 100, - gasPerByte: 1 - }); - protocolFeeConfig = ProtocolFeeConfig({zroFee: 1e18, nativeBP: 1000}); // BP 0.1 - oracleFee = 1e16; - defaultAdapterParams = LzLib.buildDefaultAdapterParams(200_000); - - exocoreValidatorSet = _exocoreValidatorSet; - } - - modifier onlyExocoreValidatorSet() { - require(msg.sender == exocoreValidatorSet, "only authorized to exocore validator set"); - _; - } - - // ------------------------------ ILayerZeroEndpoint Functions ------------------------------ - function send( - uint16 _chainId, - bytes memory _path, - bytes calldata _payload, - address payable _refundAddress, - address _zroPaymentAddress, - bytes memory _adapterParams - ) external payable override sendNonReentrant { - require(_path.length == 40, "LayerZeroMock: incorrect remote address size"); // only support evm chains - - address dstAddr; - assembly { - dstAddr := mload(add(_path, 20)) - } - - address lzEndpoint = lzEndpointLookup[dstAddr]; - require(lzEndpoint != address(0), "LayerZeroMock: destination LayerZero Endpoint not found"); - - // not handle zro token - bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams; - (uint256 nativeFee,) = - estimateFees(_chainId, msg.sender, _payload, _zroPaymentAddress != address(0x0), adapterParams); - require(msg.value >= nativeFee, "LayerZeroMock: not enough native for fees"); - - uint64 nonce = ++outboundNonce[_chainId][msg.sender]; - - { - // refund if they send too much - uint256 amount = msg.value - nativeFee; - if (amount > 0) { - (bool success,) = _refundAddress.call{value: amount}(""); - require(success, "LayerZeroMock: failed to refund"); - } - } - - // Mock the process of receiving msg on dst chain - // Mock the relayer paying the dstNativeAddr the amount of extra native token - (,, uint256 dstNativeAmt, address payable dstNativeAddr) = LzLib.decodeAdapterParams(adapterParams); - if (dstNativeAmt > 0) { - (bool success,) = dstNativeAddr.call{value: dstNativeAmt}(""); - if (!success) { - emit ValueTransferFailed(dstNativeAddr, dstNativeAmt); - } - } - - bytes memory payload = _payload; - _sendMessage(_chainId, msg.sender, dstAddr, nonce, payload); - } - - function _sendMessage(uint16 dstChainId, address srcAddress, address dstAddr, uint64 nonce, bytes memory payload) - internal - { - emit Packet(dstChainId, srcAddress, dstAddr, nonce, payload); - } - - function receivePayload( - uint16 _srcChainId, - bytes calldata _path, - address _dstAddress, - uint64 _nonce, - uint256 _gasLimit, - bytes calldata _payload - ) external override receiveNonReentrant { - StoredPayload storage sp = storedPayload[_srcChainId][_path]; - - // assert and increment the nonce. no message shuffling - require(_nonce == ++inboundNonce[_srcChainId][_path], "LayerZeroMock: wrong nonce"); - - // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on - // dst - if (sp.payloadHash != bytes32(0)) { - QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path]; - QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload); - - // warning, might run into gas issues trying to forward through a bunch of queued msgs - // shift all the msgs over so we can treat this like a fifo via array.pop() - if (msgs.length > 0) { - // extend the array - msgs.push(newMsg); - - // shift all the indexes up for pop() - for (uint256 i = 0; i < msgs.length - 1; i++) { - msgs[i + 1] = msgs[i]; - } - - // put the newMsg at the bottom of the stack - msgs[0] = newMsg; - } else { - msgs.push(newMsg); - } - } else if (nextMsgBlocked) { - storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload)); - emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, bytes("")); - // ensure the next msgs that go through are no longer blocked - nextMsgBlocked = false; - } else { - try ILayerZeroReceiver(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _path, _nonce, _payload) {} - catch (bytes memory reason) { - storedPayload[_srcChainId][_path] = - StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload)); - emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, reason); - // ensure the next msgs that go through are no longer blocked - nextMsgBlocked = false; - } - } - } - - function getInboundNonce(uint16 _chainID, bytes calldata _path) external view override returns (uint64) { - return inboundNonce[_chainID][_path]; - } - - function resetInboundNonce(uint16 _srcChainId, bytes calldata _path, uint64 _nonce) - external - onlyExocoreValidatorSet - { - inboundNonce[_srcChainId][_path] = _nonce; - } - - function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) { - return outboundNonce[_chainID][_srcAddress]; - } - - function resetOutboundNonce(uint16 _dstChainId, address _srcAddress, uint64 _nonce) - external - onlyExocoreValidatorSet - { - outboundNonce[_dstChainId][_srcAddress] = _nonce; - } - - function estimateFees( - uint16 _dstChainId, - address _userApplication, - bytes memory _payload, - bool _payInZRO, - bytes memory _adapterParams - ) public view override returns (uint256 nativeFee, uint256 zroFee) { - // bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams; - - // // Relayer Fee - // uint relayerFee = _getRelayerFee(_dstChainId, 1, _userApplication, _payload.length, adapterParams); - - // // LayerZero Fee - // uint protocolFee = _getProtocolFees(_payInZRO, relayerFee, oracleFee); - // _payInZRO ? zroFee = protocolFee : nativeFee = protocolFee; - - // // return the sum of fees - // nativeFee = nativeFee + relayerFee + oracleFee; - - // TEST ONLY - return (0, 0); - } - - function getChainId() external view override returns (uint16) { - return mockChainId; - } - - function retryPayload(uint16 _srcChainId, bytes calldata _path, bytes calldata _payload) external override { - StoredPayload storage sp = storedPayload[_srcChainId][_path]; - require(sp.payloadHash != bytes32(0), "LayerZeroMock: no stored payload"); - require( - _payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, - "LayerZeroMock: invalid payload" - ); - - address dstAddress = sp.dstAddress; - // empty the storedPayload - sp.payloadLength = 0; - sp.dstAddress = address(0); - sp.payloadHash = bytes32(0); - - uint64 nonce = inboundNonce[_srcChainId][_path]; - - ILayerZeroReceiver(dstAddress).lzReceive(_srcChainId, _path, nonce, _payload); - emit PayloadCleared(_srcChainId, _path, nonce, dstAddress); - } - - function hasStoredPayload(uint16 _srcChainId, bytes calldata _path) external view override returns (bool) { - StoredPayload storage sp = storedPayload[_srcChainId][_path]; - return sp.payloadHash != bytes32(0); - } - - function getSendLibraryAddress(address) external view override returns (address) { - return address(this); - } - - function getReceiveLibraryAddress(address) external view override returns (address) { - return address(this); - } - - function isSendingPayload() external view override returns (bool) { - return _send_entered_state == _ENTERED; - } - - function isReceivingPayload() external view override returns (bool) { - return _receive_entered_state == _ENTERED; - } - - function getConfig( - uint16, - /*_version*/ - uint16, - /*_chainId*/ - address, - /*_ua*/ - uint256 /*_configType*/ - ) external pure override returns (bytes memory) { - return ""; - } - - function getSendVersion(address /*_userApplication*/ ) external pure override returns (uint16) { - return 1; - } - - function getReceiveVersion(address /*_userApplication*/ ) external pure override returns (uint16) { - return 1; - } - - function setConfig( - uint16, - /*_version*/ - uint16, - /*_chainId*/ - uint256, - /*_configType*/ - bytes memory /*_config*/ - ) external override {} - - function setSendVersion(uint16 /*version*/ ) external override {} - - function setReceiveVersion(uint16 /*version*/ ) external override {} - - function forceResumeReceive(uint16 _srcChainId, bytes calldata _path) external override { - StoredPayload storage sp = storedPayload[_srcChainId][_path]; - // revert if no messages are cached. safeguard malicious UA behaviour - require(sp.payloadHash != bytes32(0), "LayerZeroMock: no stored payload"); - require(sp.dstAddress == msg.sender, "LayerZeroMock: invalid caller"); - - // empty the storedPayload - sp.payloadLength = 0; - sp.dstAddress = address(0); - sp.payloadHash = bytes32(0); - - emit UaForceResumeReceive(_srcChainId, _path); - - // resume the receiving of msgs after we force clear the "stuck" msg - _clearMsgQue(_srcChainId, _path); - } - - // ------------------------------ Other Public/External Functions -------------------------------------------------- - - function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint256) { - return msgsToDeliver[_srcChainId][_srcAddress].length; - } - - // used to simulate messages received get stored as a payload - function blockNextMsg() external { - nextMsgBlocked = true; - } - - function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external { - lzEndpointLookup[destAddr] = lzEndpointAddr; - } - - function setRelayerPrice( - uint128 _dstPriceRatio, - uint128 _dstGasPriceInWei, - uint128 _dstNativeAmtCap, - uint64 _baseGas, - uint64 _gasPerByte - ) external { - relayerFeeConfig.dstPriceRatio = _dstPriceRatio; - relayerFeeConfig.dstGasPriceInWei = _dstGasPriceInWei; - relayerFeeConfig.dstNativeAmtCap = _dstNativeAmtCap; - relayerFeeConfig.baseGas = _baseGas; - relayerFeeConfig.gasPerByte = _gasPerByte; - } - - function setProtocolFee(uint256 _zroFee, uint256 _nativeBP) external { - protocolFeeConfig.zroFee = _zroFee; - protocolFeeConfig.nativeBP = _nativeBP; - } - - function setOracleFee(uint256 _oracleFee) external { - oracleFee = _oracleFee; - } - - function setDefaultAdapterParams(bytes memory _adapterParams) external { - defaultAdapterParams = _adapterParams; - } - - // --------------------- Internal Functions --------------------- - // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload - function _clearMsgQue(uint16 _srcChainId, bytes calldata _path) internal { - QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path]; - - // warning, might run into gas issues trying to forward through a bunch of queued msgs - while (msgs.length > 0) { - QueuedPayload memory payload = msgs[msgs.length - 1]; - ILayerZeroReceiver(payload.dstAddress).lzReceive(_srcChainId, _path, payload.nonce, payload.payload); - msgs.pop(); - } - } - - function _getProtocolFees(bool _payInZro, uint256 _relayerFee, uint256 _oracleFee) - internal - view - returns (uint256) - { - if (_payInZro) { - return protocolFeeConfig.zroFee; - } else { - return ((_relayerFee + _oracleFee) * protocolFeeConfig.nativeBP) / 10_000; - } - } - - function _getRelayerFee( - uint16, /* _dstChainId */ - uint16, /* _outboundProofType */ - address, /* _userApplication */ - uint256 _payloadSize, - bytes memory _adapterParams - ) internal view returns (uint256) { - (uint16 txType, uint256 extraGas, uint256 dstNativeAmt,) = LzLib.decodeAdapterParams(_adapterParams); - uint256 totalRemoteToken; // = baseGas + extraGas + requiredNativeAmount - if (txType == 2) { - require(relayerFeeConfig.dstNativeAmtCap >= dstNativeAmt, "LayerZeroMock: dstNativeAmt too large "); - totalRemoteToken += dstNativeAmt; - } - // remoteGasTotal = dstGasPriceInWei * (baseGas + extraGas) - uint256 remoteGasTotal = relayerFeeConfig.dstGasPriceInWei * (relayerFeeConfig.baseGas + extraGas); - totalRemoteToken += remoteGasTotal; - - // tokenConversionRate = dstPrice / localPrice - // basePrice = totalRemoteToken * tokenConversionRate - uint256 basePrice = (totalRemoteToken * relayerFeeConfig.dstPriceRatio) / 10 ** 10; - - // pricePerByte = (dstGasPriceInWei * gasPerBytes) * tokenConversionRate - uint256 pricePerByte = ( - relayerFeeConfig.dstGasPriceInWei * relayerFeeConfig.gasPerByte * relayerFeeConfig.dstPriceRatio - ) / 10 ** 10; - - return basePrice + _payloadSize * pricePerByte; - } - -}