diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2797a0889..35ad097ff 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ about: Report a bug in OpenZeppelin Contracts **💻 Environment** - + **📝 Details** diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9951280b7..7a44045a1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -34,8 +34,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - - name: Compile contracts # TODO: Remove after migrating tests to ethers - run: npm run compile - name: Run tests and generate gas report run: npm run test - name: Check linearisation of the inheritance graph @@ -64,8 +62,6 @@ jobs: cp -rnT contracts lib/openzeppelin-contracts/contracts - name: Transpile to upgradeable run: bash scripts/upgradeable/transpile.sh - - name: Compile contracts # TODO: Remove after migrating tests to ethers - run: npm run compile - name: Run tests run: npm run test - name: Check linearisation of the inheritance graph @@ -94,8 +90,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - - name: Compile contracts # TODO: Remove after migrating tests to ethers - run: npm run compile - name: Run coverage run: npm run coverage - uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index a6caa9fc7..b2b1eab1e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,15 +29,9 @@ npm-debug.log # local env variables .env -# truffle build directory -build/ - # macOS .DS_Store -# truffle -.node-xmlhttprequest-* - # IntelliJ IDE .idea diff --git a/README.md b/README.md index 06f54553a..2f4609f00 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ### Installation -#### Hardhat, Truffle (npm) +#### Hardhat (npm) ``` $ npm install @openzeppelin/contracts diff --git a/contracts/proxy/README.adoc b/contracts/proxy/README.adoc index c6badf0fc..1c4d0105c 100644 --- a/contracts/proxy/README.adoc +++ b/contracts/proxy/README.adoc @@ -19,7 +19,7 @@ There are two alternative ways to add upgradeability to an ERC-1967 proxy. Their - {TransparentUpgradeableProxy}: A proxy with a built-in immutable admin and upgrade interface. - {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation contract. -CAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Truffle and Hardhat. +CAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Hardhat and Foundry. A different family of proxies are beacon proxies. This pattern, popularized by Dharma, allows multiple proxies to be upgraded to a different implementation in a single transaction. diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index b1e68e955..a4e163fec 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -13,7 +13,7 @@ IMPORTANT: OpenZeppelin Contracts uses semantic versioning to communicate backwa [[install]] === Installation -==== Hardhat, Truffle (npm) +==== Hardhat (npm) ```console $ npm install @openzeppelin/contracts diff --git a/docs/modules/ROOT/pages/utilities.adoc b/docs/modules/ROOT/pages/utilities.adoc index 02ae4efff..1688ae741 100644 --- a/docs/modules/ROOT/pages/utilities.adoc +++ b/docs/modules/ROOT/pages/utilities.adoc @@ -186,16 +186,15 @@ contract Box is Multicall { } ---- -This is how to call the `multicall` function using Truffle, allowing `foo` and `bar` to be called in a single transaction: +This is how to call the `multicall` function using Ethers.js, allowing `foo` and `bar` to be called in a single transaction: [source,javascript] ---- // scripts/foobar.js -const Box = artifacts.require('Box'); -const instance = await Box.new(); +const instance = await ethers.deployContract("Box"); await instance.multicall([ - instance.contract.methods.foo().encodeABI(), - instance.contract.methods.bar().encodeABI() + instance.interface.encodeFunctionData("foo"), + instance.interface.encodeFunctionData("bar") ]); ---- diff --git a/docs/modules/ROOT/pages/wizard.adoc b/docs/modules/ROOT/pages/wizard.adoc index 262505378..ed416e2da 100644 --- a/docs/modules/ROOT/pages/wizard.adoc +++ b/docs/modules/ROOT/pages/wizard.adoc @@ -4,7 +4,7 @@ Not sure where to start? Use the interactive generator below to bootstrap your contract and learn about the components offered in OpenZeppelin Contracts. -TIP: Place the resulting contract in your `contracts` directory in order to compile it with a tool like Hardhat or Truffle. Consider reading our guide on xref:learn::developing-smart-contracts.adoc[Developing Smart Contracts] for more guidance! +TIP: Place the resulting contract in your `contracts` or `src` directory in order to compile it with a tool like Hardhat or Foundry. Consider reading our guide on xref:learn::developing-smart-contracts.adoc[Developing Smart Contracts] for more guidance! ++++ diff --git a/hardhat.config.js b/hardhat.config.js index 3102cfda5..dac13f5e0 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -55,7 +55,6 @@ const argv = require('yargs/yargs')() }, }).argv; -require('@nomiclabs/hardhat-truffle5'); // deprecated require('@nomicfoundation/hardhat-toolbox'); require('@nomicfoundation/hardhat-ethers'); require('hardhat-ignore-warnings'); diff --git a/hardhat/env-contract.js b/hardhat/env-contract.js index 06d4f187d..fb01482f6 100644 --- a/hardhat/env-contract.js +++ b/hardhat/env-contract.js @@ -15,27 +15,4 @@ extendEnvironment(hre => { const filteredSignersAsPromise = originalGetSigners().then(signers => signers.slice(1)); hre.ethers.getSigners = () => filteredSignersAsPromise; } - - // override hre.contract - const originalContract = hre.contract; - hre.contract = function (name, body) { - originalContract.call(this, name, accounts => { - let snapshot; - - before(async function () { - // reset the state of the chain in between contract test suites - // TODO: this should be removed when migration to ethers is over - const { takeSnapshot } = require('@nomicfoundation/hardhat-network-helpers'); - snapshot = await takeSnapshot(); - }); - - after(async function () { - // reset the state of the chain in between contract test suites - // TODO: this should be removed when migration to ethers is over - await snapshot.restore(); - }); - - body(accounts.slice(1)); - }); - }; }); diff --git a/package-lock.json b/package-lock.json index fc8a1ca7f..1e5382369 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,24 +13,18 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.6.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "@nomiclabs/hardhat-truffle5": "^2.0.5", - "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", - "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", "chai": "^4.2.0", "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", - "eth-sig-util": "^3.0.0", - "ethereumjs-util": "^7.0.7", - "ethereumjs-wallet": "^1.0.1", "ethers": "^6.7.1", "glob": "^10.3.5", "graphlib": "^2.1.8", @@ -51,7 +45,6 @@ "solidity-coverage": "^0.8.5", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", - "web3": "^1.3.0", "yargs": "^17.0.0" } }, @@ -579,106 +572,6 @@ "node": ">=12" } }, - "node_modules/@ensdomains/address-encoder": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", - "integrity": "sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg==", - "dev": true, - "dependencies": { - "bech32": "^1.1.3", - "blakejs": "^1.1.0", - "bn.js": "^4.11.8", - "bs58": "^4.0.1", - "crypto-addr-codec": "^0.1.7", - "nano-base32": "^1.0.1", - "ripemd160": "^2.0.2" - } - }, - "node_modules/@ensdomains/ens": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/@ensdomains/ens/-/ens-0.4.5.tgz", - "integrity": "sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==", - "deprecated": "Please use @ensdomains/ens-contracts", - "dev": true, - "dependencies": { - "bluebird": "^3.5.2", - "eth-ens-namehash": "^2.0.8", - "solc": "^0.4.20", - "testrpc": "0.0.1", - "web3-utils": "^1.0.0-beta.31" - } - }, - "node_modules/@ensdomains/ensjs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@ensdomains/ensjs/-/ensjs-2.1.0.tgz", - "integrity": "sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.4.4", - "@ensdomains/address-encoder": "^0.1.7", - "@ensdomains/ens": "0.4.5", - "@ensdomains/resolver": "0.2.4", - "content-hash": "^2.5.2", - "eth-ens-namehash": "^2.0.8", - "ethers": "^5.0.13", - "js-sha3": "^0.8.0" - } - }, - "node_modules/@ensdomains/ensjs/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "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" - } - ], - "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/@ensdomains/resolver": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@ensdomains/resolver/-/resolver-0.2.4.tgz", - "integrity": "sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==", - "deprecated": "Please use @ensdomains/ens-contracts", - "dev": true - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -753,16 +646,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@ethereumjs/common": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz", - "integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==", - "dev": true, - "dependencies": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.1" - } - }, "node_modules/@ethereumjs/rlp": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", @@ -775,16 +658,6 @@ "node": ">=14" } }, - "node_modules/@ethereumjs/tx": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz", - "integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==", - "dev": true, - "dependencies": { - "@ethereumjs/common": "^2.5.0", - "ethereumjs-util": "^7.1.2" - } - }, "node_modules/@ethereumjs/util": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", @@ -2205,9 +2078,9 @@ } }, "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==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.3.tgz", + "integrity": "sha512-A40s7EAK4Acr8UP1Yudgi9GGD9Cca/K3LHt3DzmRIje14lBfHtg9atGQ7qK56vdPcTwKmeaGn30FzxMUfPGEMw==", "dev": true, "dependencies": { "@types/chai-as-promised": "^7.1.3", @@ -2510,144 +2383,6 @@ "node": ">= 10" } }, - "node_modules/@nomiclabs/hardhat-truffle5": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz", - "integrity": "sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==", - "dev": true, - "dependencies": { - "@nomiclabs/truffle-contract": "^4.2.23", - "@types/chai": "^4.2.0", - "chai": "^4.2.0", - "ethereumjs-util": "^7.1.4", - "fs-extra": "^7.0.1" - }, - "peerDependencies": { - "@nomiclabs/hardhat-web3": "^2.0.0", - "hardhat": "^2.6.4", - "web3": "^1.0.0-beta.36" - } - }, - "node_modules/@nomiclabs/hardhat-web3": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz", - "integrity": "sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==", - "dev": true, - "dependencies": { - "@types/bignumber.js": "^5.0.0" - }, - "peerDependencies": { - "hardhat": "^2.0.0", - "web3": "^1.0.0-beta.36" - } - }, - "node_modules/@nomiclabs/truffle-contract": { - "version": "4.5.10", - "resolved": "https://registry.npmjs.org/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz", - "integrity": "sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ==", - "dev": true, - "dependencies": { - "@ensdomains/ensjs": "^2.0.1", - "@truffle/blockchain-utils": "^0.1.3", - "@truffle/contract-schema": "^3.4.7", - "@truffle/debug-utils": "^6.0.22", - "@truffle/error": "^0.1.0", - "@truffle/interface-adapter": "^0.5.16", - "bignumber.js": "^7.2.1", - "ethereum-ens": "^0.8.0", - "ethers": "^4.0.0-beta.1", - "source-map-support": "^0.5.19" - }, - "peerDependencies": { - "web3": "^1.2.1", - "web3-core-helpers": "^1.2.1", - "web3-core-promievent": "^1.2.1", - "web3-eth-abi": "^1.2.1", - "web3-utils": "^1.2.1" - } - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "node_modules/@nomiclabs/truffle-contract/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true - }, - "node_modules/@openzeppelin/contract-loader": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz", - "integrity": "sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - } - }, - "node_modules/@openzeppelin/contract-loader/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, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, "node_modules/@openzeppelin/docs-utils": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/@openzeppelin/docs-utils/-/docs-utils-0.1.5.tgz", @@ -2802,42 +2537,6 @@ "@scure/bip39": "1.1.1" } }, - "node_modules/@openzeppelin/test-helpers": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz", - "integrity": "sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==", - "dev": true, - "dependencies": { - "@openzeppelin/contract-loader": "^0.6.2", - "@truffle/contract": "^4.0.35", - "ansi-colors": "^3.2.3", - "chai": "^4.2.0", - "chai-bn": "^0.2.1", - "ethjs-abi": "^0.2.1", - "lodash.flatten": "^4.4.0", - "semver": "^5.6.0", - "web3": "^1.2.5", - "web3-utils": "^1.2.5" - } - }, - "node_modules/@openzeppelin/test-helpers/node_modules/ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@openzeppelin/test-helpers/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/@openzeppelin/upgrade-safe-transpiler": { "version": "0.3.32", "resolved": "https://registry.npmjs.org/@openzeppelin/upgrade-safe-transpiler/-/upgrade-safe-transpiler-0.3.32.tgz", @@ -3160,18 +2859,6 @@ "node": ">=6" } }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, "node_modules/@solidity-parser/parser": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", @@ -3181,1112 +2868,6 @@ "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.1" - }, - "engines": { - "node": ">=14.16" - } - }, - "node_modules/@truffle/abi-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-1.0.3.tgz", - "integrity": "sha512-AWhs01HCShaVKjml7Z4AbVREr/u4oiWxCcoR7Cktm0mEvtT04pvnxW5xB/cI4znRkrbPdFQlFt67kgrAjesYkw==", - "dev": true, - "dependencies": { - "change-case": "3.0.2", - "fast-check": "3.1.1", - "web3-utils": "1.10.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/abi-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/abi-utils/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/blockchain-utils": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.9.tgz", - "integrity": "sha512-RHfumgbIVo68Rv9ofDYfynjnYZIfP/f1vZy4RoqkfYAO+fqfc58PDRzB1WAGq2U6GPuOnipOJxQhnqNnffORZg==", - "dev": true, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/codec": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.17.3.tgz", - "integrity": "sha512-Ko/+dsnntNyrJa57jUD9u4qx9nQby+H4GsUO6yjiCPSX0TQnEHK08XWqBSg0WdmCH2+h0y1nr2CXSx8gbZapxg==", - "dev": true, - "dependencies": { - "@truffle/abi-utils": "^1.0.3", - "@truffle/compile-common": "^0.9.8", - "big.js": "^6.0.3", - "bn.js": "^5.1.3", - "cbor": "^5.2.0", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "semver": "^7.5.4", - "utf8": "^3.0.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/codec/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==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/@truffle/codec/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/codec/node_modules/cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", - "dev": true, - "dependencies": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@truffle/codec/node_modules/nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@truffle/codec/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/compile-common": { - "version": "0.9.8", - "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.8.tgz", - "integrity": "sha512-DTpiyo32t/YhLI1spn84D3MHYHrnoVqO+Gp7ZHrYNwDs86mAxtNiH5lsVzSb8cPgiqlvNsRCU9nm9R0YmKMTBQ==", - "dev": true, - "dependencies": { - "@truffle/error": "^0.2.2", - "colors": "1.4.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/compile-common/node_modules/@truffle/error": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.2.tgz", - "integrity": "sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==", - "dev": true, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/contract": { - "version": "4.6.31", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.6.31.tgz", - "integrity": "sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ==", - "dev": true, - "dependencies": { - "@ensdomains/ensjs": "^2.1.0", - "@truffle/blockchain-utils": "^0.1.9", - "@truffle/contract-schema": "^3.4.16", - "@truffle/debug-utils": "^6.0.57", - "@truffle/error": "^0.2.2", - "@truffle/interface-adapter": "^0.5.37", - "bignumber.js": "^7.2.1", - "debug": "^4.3.1", - "ethers": "^4.0.32", - "web3": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/contract-schema": { - "version": "3.4.16", - "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.16.tgz", - "integrity": "sha512-g0WNYR/J327DqtJPI70ubS19K1Fth/1wxt2jFqLsPmz5cGZVjCwuhiie+LfBde4/Mc9QR8G+L3wtmT5cyoBxAg==", - "dev": true, - "dependencies": { - "ajv": "^6.10.0", - "debug": "^4.3.1" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/contract/node_modules/@truffle/error": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.2.tgz", - "integrity": "sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg==", - "dev": true, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/contract/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/@truffle/contract/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "node_modules/@truffle/contract/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "node_modules/@truffle/contract/node_modules/ethers/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/ethers/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "node_modules/@truffle/contract/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@truffle/contract/node_modules/web3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", - "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-bzz": "1.10.0", - "web3-core": "1.10.0", - "web3-eth": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-shh": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-bzz": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", - "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", - "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-requestmanager": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-core-method": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", - "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", - "dev": true, - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-core-requestmanager": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", - "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", - "dev": true, - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.0", - "web3-providers-http": "1.10.0", - "web3-providers-ipc": "1.10.0", - "web3-providers-ws": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-core-subscriptions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", - "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-core/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==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/@truffle/contract/node_modules/web3-eth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", - "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", - "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-accounts": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-eth-ens": "1.10.0", - "web3-eth-iban": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-eth-abi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", - "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", - "dev": true, - "dependencies": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-eth-accounts": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", - "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", - "dev": true, - "dependencies": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.1.5", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-eth-contract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", - "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-eth-ens": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", - "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", - "dev": true, - "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-eth-personal": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", - "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", - "dev": true, - "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-net": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", - "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", - "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-providers-http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", - "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", - "dev": true, - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-providers-ipc": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", - "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", - "dev": true, - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-providers-ws": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", - "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0", - "websocket": "^1.0.32" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-shh": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", - "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-net": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/contract/node_modules/web3-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/debug-utils": { - "version": "6.0.57", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.57.tgz", - "integrity": "sha512-Q6oI7zLaeNLB69ixjwZk2UZEWBY6b2OD1sjLMGDKBGR7GaHYiw96GLR2PFgPH1uwEeLmV4N78LYaQCrDsHbNeA==", - "dev": true, - "dependencies": { - "@truffle/codec": "^0.17.3", - "@trufflesuite/chromafi": "^3.0.0", - "bn.js": "^5.1.3", - "chalk": "^2.4.2", - "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.6" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/debug-utils/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/error": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.1.tgz", - "integrity": "sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA==", - "dev": true - }, - "node_modules/@truffle/interface-adapter": { - "version": "0.5.37", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.37.tgz", - "integrity": "sha512-lPH9MDgU+7sNDlJSClwyOwPCfuOimqsCx0HfGkznL3mcFRymc1pukAR1k17zn7ErHqBwJjiKAZ6Ri72KkS+IWw==", - "dev": true, - "dependencies": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.10.0" - }, - "engines": { - "node": "^16.20 || ^18.16 || >=20" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/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==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/eth-lib/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==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers/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==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true - }, - "node_modules/@truffle/interface-adapter/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.0.tgz", - "integrity": "sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-bzz": "1.10.0", - "web3-core": "1.10.0", - "web3-eth": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-shh": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-bzz": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.0.tgz", - "integrity": "sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.0.tgz", - "integrity": "sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-requestmanager": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core-method": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.0.tgz", - "integrity": "sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA==", - "dev": true, - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core-requestmanager": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz", - "integrity": "sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ==", - "dev": true, - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.0", - "web3-providers-http": "1.10.0", - "web3-providers-ipc": "1.10.0", - "web3-providers-ws": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-core-subscriptions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz", - "integrity": "sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.0.tgz", - "integrity": "sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA==", - "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-accounts": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-eth-ens": "1.10.0", - "web3-eth-iban": "1.10.0", - "web3-eth-personal": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-abi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz", - "integrity": "sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==", - "dev": true, - "dependencies": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-accounts": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz", - "integrity": "sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q==", - "dev": true, - "dependencies": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.1.5", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-contract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz", - "integrity": "sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-ens": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz", - "integrity": "sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g==", - "dev": true, - "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-promievent": "1.10.0", - "web3-eth-abi": "1.10.0", - "web3-eth-contract": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-eth-personal": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz", - "integrity": "sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg==", - "dev": true, - "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.0", - "web3-core-helpers": "1.10.0", - "web3-core-method": "1.10.0", - "web3-net": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-net": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.0.tgz", - "integrity": "sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA==", - "dev": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-providers-http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.0.tgz", - "integrity": "sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA==", - "dev": true, - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ipc": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz", - "integrity": "sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==", - "dev": true, - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ws": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz", - "integrity": "sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.0", - "websocket": "^1.0.32" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-shh": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.0.tgz", - "integrity": "sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-core": "1.10.0", - "web3-core-method": "1.10.0", - "web3-core-subscriptions": "1.10.0", - "web3-net": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@truffle/interface-adapter/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@trufflesuite/chromafi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", - "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", - "dev": true, - "dependencies": { - "camelcase": "^4.1.0", - "chalk": "^2.3.2", - "cheerio": "^1.0.0-rc.2", - "detect-indent": "^5.0.0", - "highlight.js": "^10.4.1", - "lodash.merge": "^4.6.2", - "strip-ansi": "^4.0.0", - "strip-indent": "^2.0.0" - } - }, - "node_modules/@trufflesuite/chromafi/node_modules/detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -4386,16 +2967,6 @@ "node": ">= 10.0.0" } }, - "node_modules/@types/bignumber.js": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", - "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", - "deprecated": "This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need @types/bignumber.js installed!", - "dev": true, - "dependencies": { - "bignumber.js": "*" - } - }, "node_modules/@types/bn.js": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz", @@ -4405,18 +2976,6 @@ "@types/node": "*" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, "node_modules/@types/chai": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", @@ -4460,12 +3019,6 @@ "@types/node": "*" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.2.tgz", - "integrity": "sha512-FD+nQWA2zJjh4L9+pFXqWOi0Hs1ryBCfI+985NjluQ1p8EYtoLvjLOKidXBtZ4/IcxDX4o8/E8qDS3540tNliw==", - "dev": true - }, "node_modules/@types/is-ci": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.0.tgz", @@ -4475,15 +3028,6 @@ "ci-info": "^3.1.0" } }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4562,15 +3106,6 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/secp256k1": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", @@ -4592,12 +3127,6 @@ "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", "dev": true }, - "node_modules/abortcontroller-polyfill": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", - "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", - "dev": true - }, "node_modules/abstract-level": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", @@ -4640,19 +3169,6 @@ "ieee754": "^1.2.1" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -4702,12 +3218,6 @@ "node": ">=0.3.0" } }, - "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/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -4883,12 +3393,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -4980,24 +3484,6 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -5028,12 +3514,6 @@ "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "dev": true }, - "node_modules/async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -5062,21 +3542,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true - }, "node_modules/axios": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", @@ -5137,21 +3602,6 @@ } ] }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -5170,28 +3620,6 @@ "node": ">=4" } }, - "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": ">=0.6" - } - }, - "node_modules/big.js": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", - "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", - "dev": true, - "engines": { - "node": "*" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bigjs" - } - }, "node_modules/bigint-crypto-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", @@ -5201,15 +3629,6 @@ "node": ">=14.0.0" } }, - "node_modules/bignumber.js": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -5225,78 +3644,12 @@ "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", "dev": true }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "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==", "dev": true }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5386,42 +3739,12 @@ "safe-buffer": "^5.1.2" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==", - "dev": true - }, "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -5434,6 +3757,8 @@ "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "dev": true, "hasInstallScript": true, + "optional": true, + "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -5450,57 +3775,6 @@ "node": ">= 0.8" } }, - "node_modules/cacheable-lookup": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", - "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", - "dev": true, - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -5523,25 +3797,6 @@ "node": ">=6" } }, - "node_modules/camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "node_modules/camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/camelcase-keys": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", @@ -5634,16 +3889,6 @@ "chai": ">= 2.1.2 < 5" } }, - "node_modules/chai-bn": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", - "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", - "dev": true, - "peerDependencies": { - "bn.js": "^4.11.0", - "chai": "^4.0.0" - } - }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -5658,32 +3903,6 @@ "node": ">=4" } }, - "node_modules/change-case": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", - "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", - "dev": true, - "dependencies": { - "camel-case": "^3.0.0", - "constant-case": "^2.0.0", - "dot-case": "^2.1.0", - "header-case": "^1.0.0", - "is-lower-case": "^1.1.0", - "is-upper-case": "^1.1.0", - "lower-case": "^1.1.1", - "lower-case-first": "^1.0.0", - "no-case": "^2.3.2", - "param-case": "^2.1.0", - "pascal-case": "^2.0.0", - "path-case": "^2.1.0", - "sentence-case": "^2.1.0", - "snake-case": "^2.1.0", - "swap-case": "^1.1.0", - "title-case": "^2.1.0", - "upper-case": "^1.1.1", - "upper-case-first": "^1.1.0" - } - }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -5708,44 +3927,6 @@ "node": "*" } }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -5773,12 +3954,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, "node_modules/ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", @@ -5794,35 +3969,6 @@ "node": ">=8" } }, - "node_modules/cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" - }, - "engines": { - "node": ">=4.0.0", - "npm": ">=3.0.0" - } - }, - "node_modules/cids/node_modules/multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "buffer": "^5.6.0", - "varint": "^5.0.0" - } - }, "node_modules/cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -5833,12 +3979,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "dev": true - }, "node_modules/classic-level": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", @@ -5948,27 +4088,6 @@ "node": ">=0.8" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -6135,48 +4254,6 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/constant-case": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", - "integrity": "sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==", - "dev": true, - "dependencies": { - "snake-case": "^2.1.0", - "upper-case": "^1.1.1" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", - "dev": true, - "dependencies": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -6186,31 +4263,12 @@ "node": ">= 0.6" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cosmiconfig": { "version": "8.3.6", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", @@ -6301,15 +4359,6 @@ "dev": true, "peer": true }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -6333,49 +4382,6 @@ "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/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/csv": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", @@ -6409,28 +4415,6 @@ "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", "dev": true }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dataloader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", @@ -6494,42 +4478,6 @@ "node": ">=0.10.0" } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -6570,15 +4518,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/define-data-property": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", @@ -6628,16 +4567,6 @@ "node": ">= 0.8" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -6706,76 +4635,6 @@ "node": ">=6.0.0" } }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "dev": true - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dot-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", - "integrity": "sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, "node_modules/dotenv": { "version": "8.6.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", @@ -6791,22 +4650,6 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -6828,24 +4671,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/enquirer": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", @@ -6880,18 +4705,6 @@ "node": ">=8" } }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -7003,48 +4816,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -7054,12 +4825,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -7509,31 +5274,6 @@ "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", - "dev": true, - "dependencies": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - } - }, - "node_modules/eth-ens-namehash/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, "node_modules/eth-gas-reporter": { "version": "0.2.27", "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", @@ -7668,65 +5408,6 @@ "@ethersproject/wordlists": "5.7.0" } }, - "node_modules/eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - } - }, - "node_modules/eth-lib/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==", - "dev": true - }, - "node_modules/eth-lib/node_modules/ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "dependencies": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - }, - "node_modules/eth-sig-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", - "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", - "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", - "dev": true, - "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.0" - } - }, - "node_modules/eth-sig-util/node_modules/ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, "node_modules/ethereum-bloom-filters": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", @@ -7759,26 +5440,6 @@ "setimmediate": "^1.0.5" } }, - "node_modules/ethereum-ens": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", - "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", - "dev": true, - "dependencies": { - "bluebird": "^3.4.7", - "eth-ens-namehash": "^2.0.0", - "js-sha3": "^0.5.7", - "pako": "^1.0.4", - "underscore": "^1.8.3", - "web3": "^1.0.0-beta.34" - } - }, - "node_modules/ethereum-ens/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true - }, "node_modules/ethereumjs-abi": { "version": "0.6.8", "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", @@ -7835,22 +5496,6 @@ "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, - "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==", - "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/ethers": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", @@ -7930,33 +5575,6 @@ } } }, - "node_modules/ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA==", - "dev": true, - "dependencies": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-abi/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==", - "dev": true - }, - "node_modules/ethjs-abi/node_modules/js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA==", - "dev": true - }, "node_modules/ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", @@ -7991,12 +5609,6 @@ "npm": ">=3" } }, - "node_modules/eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true - }, "node_modules/evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -8007,147 +5619,6 @@ "safe-buffer": "^5.1.1" } }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/express/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/express/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "dependencies": { - "type": "^2.7.2" - } - }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, "node_modules/extendable-error": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", @@ -8168,31 +5639,6 @@ "node": ">=4" } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-check": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", - "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", - "dev": true, - "dependencies": { - "pure-rand": "^5.0.1" - }, - "engines": { - "node": ">=8.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8266,39 +5712,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/find-replace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", @@ -8456,15 +5869,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", @@ -8479,36 +5883,12 @@ "node": ">= 0.12" } }, - "node_modules/form-data-encoder": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", - "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", - "dev": true - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fp-ts": { "version": "1.19.3", "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", "dev": true }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -8523,15 +5903,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "dev": true, - "dependencies": { - "minipass": "^2.6.0" - } - }, "node_modules/fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", @@ -8607,9 +5978,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "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, "engines": { "node": "*" @@ -8639,18 +6010,6 @@ "node": ">=4" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -8667,15 +6026,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/ghost-testrpc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", @@ -8756,16 +6106,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, - "dependencies": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, "node_modules/global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -8866,33 +6206,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", - "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.6.0", - "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "form-data-encoder": "1.7.1", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -8950,29 +6263,6 @@ "node": ">=0.10.0" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -9466,37 +6756,12 @@ "he": "bin/he" } }, - "node_modules/header-case": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", - "integrity": "sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.3" - } - }, "node_modules/heap": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", "dev": true }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/highlightjs-solidity": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", - "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", - "dev": true - }, "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -9514,25 +6779,6 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" - } - }, "node_modules/http-basic": { "version": "8.1.3", "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", @@ -9548,12 +6794,6 @@ "node": ">=6.0.0" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -9570,12 +6810,6 @@ "node": ">= 0.8" } }, - "node_modules/http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==", - "dev": true - }, "node_modules/http-response-object": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", @@ -9591,46 +6825,6 @@ "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "dev": true }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", - "dev": true, - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/http2-wrapper/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -9662,18 +6856,6 @@ "node": ">=0.10.0" } }, - "node_modules/idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "dev": true, - "dependencies": { - "punycode": "2.1.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -9797,15 +6979,6 @@ "node": ">= 0.10" } }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/io-ts": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", @@ -9815,31 +6988,6 @@ "fp-ts": "^1.0.0" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "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==", - "dev": true, - "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-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -9980,27 +7128,6 @@ "node": ">=4" } }, - "node_modules/is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", - "dev": true - }, - "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==", - "dev": true, - "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", @@ -10023,15 +7150,6 @@ "npm": ">=3" } }, - "node_modules/is-lower-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", - "integrity": "sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==", - "dev": true, - "dependencies": { - "lower-case": "^1.1.0" - } - }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -10180,12 +7298,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -10198,21 +7310,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-upper-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", - "integrity": "sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==", - "dev": true, - "dependencies": { - "upper-case": "^1.1.0" - } - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -10246,12 +7343,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, "node_modules/jackspeak": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", @@ -10305,12 +7396,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -10323,12 +7408,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -10341,12 +7420,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -10365,21 +7438,6 @@ "node": "*" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/keccak": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", @@ -10431,18 +7489,6 @@ "node": ">=6" } }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "dev": true, - "dependencies": { - "invert-kv": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/level": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", @@ -10525,55 +7571,6 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, - "node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", - "dev": true, - "dependencies": { - "is-utf8": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/load-yaml-file": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", @@ -10607,12 +7604,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==", - "dev": true - }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -10627,12 +7618,6 @@ "dev": true, "peer": true }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", - "dev": true - }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", @@ -10752,33 +7737,6 @@ "get-func-name": "^2.0.0" } }, - "node_modules/lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", - "dev": true - }, - "node_modules/lower-case-first": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", - "integrity": "sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==", - "dev": true, - "dependencies": { - "lower-case": "^1.1.2" - } - }, - "node_modules/lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -10839,15 +7797,6 @@ "safe-buffer": "^5.1.2" } }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/memory-level": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", @@ -10908,12 +7857,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -10923,15 +7866,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micro-ftch": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", @@ -10951,18 +7885,6 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -10984,24 +7906,6 @@ "node": ">= 0.6" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", - "dev": true, - "dependencies": { - "dom-walk": "^0.1.0" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -11058,25 +7962,6 @@ "node": ">= 6" } }, - "node_modules/minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "node_modules/minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "dev": true, - "dependencies": { - "minipass": "^2.9.0" - } - }, "node_modules/mixme": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.9.tgz", @@ -11098,19 +7983,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", - "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", - "dev": true, - "dependencies": { - "mkdirp": "*" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/mnemonist": { "version": "0.38.5", "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", @@ -11410,12 +8282,6 @@ "node": ">=10" } }, - "node_modules/mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", - "dev": true - }, "node_modules/module-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", @@ -11431,61 +8297,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "node_modules/multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "varint": "^5.0.0" - } - }, - "node_modules/multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" - } - }, - "node_modules/multihashes/node_modules/multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "deprecated": "This module has been superseded by the multiformats module", - "dev": true, - "dependencies": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "node_modules/nano-base32": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", - "integrity": "sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw==", - "dev": true - }, - "node_modules/nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==", - "dev": true - }, "node_modules/nanoid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", @@ -11510,36 +8321,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "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==", "dev": true }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, - "node_modules/no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "dependencies": { - "lower-case": "^1.1.1" - } - }, "node_modules/node-addon-api": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", @@ -11649,39 +8436,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", @@ -11702,15 +8456,6 @@ "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", "dev": true }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -11762,27 +8507,6 @@ "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", "dev": true }, - "node_modules/oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", - "dev": true, - "dependencies": { - "http-https": "^1.0.0" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -11815,18 +8539,6 @@ "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", "dev": true }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dev": true, - "dependencies": { - "lcid": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -11842,15 +8554,6 @@ "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", "dev": true }, - "node_modules/p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", - "dev": true, - "engines": { - "node": ">=12.20" - } - }, "node_modules/p-filter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", @@ -11938,21 +8641,6 @@ "node": ">=6" } }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "node_modules/param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -11971,12 +8659,6 @@ "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", "dev": true }, - "node_modules/parse-headers": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", - "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==", - "dev": true - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -11995,59 +8677,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascal-case": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", - "integrity": "sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==", - "dev": true, - "dependencies": { - "camel-case": "^3.0.0", - "upper-case-first": "^1.1.0" - } - }, - "node_modules/path-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", - "integrity": "sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -12115,12 +8744,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -12155,12 +8778,6 @@ "node": ">=0.12" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -12182,27 +8799,6 @@ "node": ">=6" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -12335,15 +8931,6 @@ "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -12370,19 +8957,6 @@ "signal-exit": "^3.0.2" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -12395,22 +8969,6 @@ "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", @@ -12420,22 +8978,6 @@ "node": ">=6" } }, - "node_modules/pure-rand": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.5.tgz", - "integrity": "sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, "node_modules/qs": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", @@ -12445,20 +8987,6 @@ "node": ">=0.6" } }, - "node_modules/query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -12497,15 +9025,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/raw-body": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", @@ -12727,48 +9246,6 @@ "node": ">=4" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -12778,15 +9255,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -12805,12 +9273,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -12820,27 +9282,6 @@ "node": ">=8" } }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/responselike/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -12888,15 +9329,6 @@ "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", @@ -13172,61 +9604,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/sentence-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", - "integrity": "sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case-first": "^1.1.2" - } - }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -13236,37 +9613,6 @@ "randombytes": "^2.1.0" } }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", - "dev": true, - "dependencies": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -13325,39 +9671,6 @@ "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/sha3/node_modules/buffer": { - "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", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", @@ -13442,49 +9755,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", - "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", - "dev": true, - "dependencies": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/simple-get/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -13703,305 +9973,6 @@ "node": ">=8" } }, - "node_modules/snake-case": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", - "integrity": "sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, - "node_modules/solc": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", - "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", - "dev": true, - "dependencies": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" - }, - "bin": { - "solcjs": "solcjs" - } - }, - "node_modules/solc/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "node_modules/solc/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.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==", - "dev": true, - "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/get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "node_modules/solc/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/solc/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/solc/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", - "dev": true - }, - "node_modules/solc/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "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==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/solc/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", - "dev": true - }, - "node_modules/solc/node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solc/node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "node_modules/solc/node_modules/yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==", - "dev": true, - "dependencies": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" - } - }, - "node_modules/solc/node_modules/yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==", - "dev": true, - "dependencies": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" - } - }, "node_modules/solhint": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", @@ -14656,37 +10627,6 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sshpk/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, "node_modules/stacktrace-parser": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", @@ -14726,15 +10666,6 @@ "mixme": "^0.5.1" } }, - "node_modules/strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -14910,15 +10841,6 @@ "npm": ">=3" } }, - "node_modules/strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -14943,135 +10865,6 @@ "node": ">=4" } }, - "node_modules/swap-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", - "integrity": "sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==", - "dev": true, - "dependencies": { - "lower-case": "^1.1.1", - "upper-case": "^1.1.1" - } - }, - "node_modules/swarm-js": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", - "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", - "dev": true, - "dependencies": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^11.8.5", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" - } - }, - "node_modules/swarm-js/node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/swarm-js/node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true, - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/swarm-js/node_modules/fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "node_modules/swarm-js/node_modules/got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, - "node_modules/swarm-js/node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dev": true, - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/swarm-js/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/swarm-js/node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/swarm-js/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/sync-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", @@ -15222,24 +11015,6 @@ "node": ">=8" } }, - "node_modules/tar": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", - "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", - "dev": true, - "dependencies": { - "chownr": "^1.1.4", - "fs-minipass": "^1.2.7", - "minipass": "^2.9.0", - "minizlib": "^1.3.3", - "mkdirp": "^0.5.5", - "safe-buffer": "^5.2.1", - "yallist": "^3.1.1" - }, - "engines": { - "node": ">=4.5" - } - }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -15252,13 +11027,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/testrpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", - "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", - "deprecated": "testrpc has been renamed to ganache-cli, please use this package from now on.", - "dev": true - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -15293,25 +11061,6 @@ "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", "dev": true }, - "node_modules/timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/title-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", - "integrity": "sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.0.3" - } - }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -15345,28 +11094,6 @@ "node": ">=0.6" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -15662,18 +11389,6 @@ "node": ">=8" } }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -15686,12 +11401,6 @@ "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", "dev": true }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -15725,19 +11434,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typechain": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", @@ -15884,15 +11580,6 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -15930,12 +11617,6 @@ "node": ">=0.8.0" } }, - "node_modules/ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -15951,12 +11632,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, "node_modules/undici": { "version": "5.26.2", "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.2.tgz", @@ -15993,21 +11668,6 @@ "node": ">= 0.8" } }, - "node_modules/upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", - "dev": true - }, - "node_modules/upper-case-first": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", - "integrity": "sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==", - "dev": true, - "dependencies": { - "upper-case": "^1.1.1" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -16017,18 +11677,14 @@ "punycode": "^2.1.0" } }, - "node_modules/url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==", - "dev": true - }, "node_modules/utf-8-validate": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "dev": true, "hasInstallScript": true, + "optional": true, + "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -16042,34 +11698,12 @@ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", "dev": true }, - "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==", - "dev": true, - "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==", "dev": true }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -16096,35 +11730,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "node_modules/varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -16134,844 +11739,6 @@ "defaults": "^1.0.3" } }, - "node_modules/web3": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.2.tgz", - "integrity": "sha512-DAtZ3a3ruPziE80uZ3Ob0YDZxt6Vk2un/F5BcBrxO70owJ9Z1Y2+loZmbh1MoAmoLGjA/SUSHeUtid3fYmBaog==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-bzz": "1.10.2", - "web3-core": "1.10.2", - "web3-eth": "1.10.2", - "web3-eth-personal": "1.10.2", - "web3-net": "1.10.2", - "web3-shh": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-bzz": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.2.tgz", - "integrity": "sha512-vLOfDCj6198Qc7esDrCKeFA/M3ZLbowsaHQ0hIL4NmIHoq7lU8aSRTa5AI+JBh8cKN1gVryJsuW2ZCc5bM4I4Q==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@types/node": "^12.12.6", - "got": "12.1.0", - "swarm-js": "^0.1.40" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-bzz/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/web3-core": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.2.tgz", - "integrity": "sha512-qTn2UmtE8tvwMRsC5pXVdHxrQ4uZ6jiLgF5DRUVtdi7dPUmX18Dp9uxKfIfhGcA011EAn8P6+X7r3pvi2YRxBw==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-requestmanager": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-helpers": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.0.tgz", - "integrity": "sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.0", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-helpers/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core-helpers/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-method": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.2.tgz", - "integrity": "sha512-gG6ES+LOuo01MJHML4gnEt702M8lcPGMYZoX8UjZzmEebGrPYOY9XccpCrsFgCeKgQzM12SVnlwwpMod1+lcLg==", - "dev": true, - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.2", - "web3-core-promievent": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-method/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core-method/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-method/node_modules/web3-core-promievent": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", - "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-method/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-promievent": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.0.tgz", - "integrity": "sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-requestmanager": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.2.tgz", - "integrity": "sha512-nlLeNJUu6fR+ZbJr2k9Du/nN3VWwB4AJPY4r6nxUODAmykgJq57T21cLP/BEk6mbiFQYGE9TrrPhh4qWxQEtAw==", - "dev": true, - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.10.2", - "web3-providers-http": "1.10.2", - "web3-providers-ipc": "1.10.2", - "web3-providers-ws": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-requestmanager/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core-requestmanager/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-requestmanager/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-subscriptions": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.2.tgz", - "integrity": "sha512-MiWcKjz4tco793EPPPLc/YOJmYUV3zAfxeQH/UVTfBejMfnNvmfwKa2SBKfPIvKQHz/xI5bV2TF15uvJEucU7w==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-subscriptions/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core-subscriptions/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core-subscriptions/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/web3-core/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==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/web3-core/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-core/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-core/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.2.tgz", - "integrity": "sha512-s38rhrntyhGShmXC4R/aQtfkpcmev9c7iZwgb9CDIBFo7K8nrEJvqIOyajeZTxnDIiGzTJmrHxiKSadii5qTRg==", - "dev": true, - "dependencies": { - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-eth-abi": "1.10.2", - "web3-eth-accounts": "1.10.2", - "web3-eth-contract": "1.10.2", - "web3-eth-ens": "1.10.2", - "web3-eth-iban": "1.10.2", - "web3-eth-personal": "1.10.2", - "web3-net": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-abi": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.2.tgz", - "integrity": "sha512-pY4fQUio7W7ZRSLf+vsYkaxJqaT/jHcALZjIxy+uBQaYAJ3t6zpQqMZkJB3Dw7HUODRJ1yI0NPEFGTnkYf/17A==", - "dev": true, - "dependencies": { - "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-accounts": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.2.tgz", - "integrity": "sha512-6/HhCBYAXN/f553/SyxS9gY62NbLgpD1zJpENcvRTDpJN3Znvli1cmpl5Q3ZIUJkvHnG//48EWfWh0cbb3fbKQ==", - "dev": true, - "dependencies": { - "@ethereumjs/common": "2.5.0", - "@ethereumjs/tx": "3.3.2", - "@ethereumjs/util": "^8.1.0", - "eth-lib": "0.2.8", - "scrypt-js": "^3.0.1", - "uuid": "^9.0.0", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-accounts/node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "node_modules/web3-eth-accounts/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/web3-eth-accounts/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-accounts/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-accounts/node_modules/web3-eth-iban/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-contract": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.2.tgz", - "integrity": "sha512-CZLKPQRmupP/+OZ5A/CBwWWkBiz5B/foOpARz0upMh1yjb0dEud4YzRW2gJaeNu0eGxDLsWVaXhUimJVGYprQw==", - "dev": true, - "dependencies": { - "@types/bn.js": "^5.1.1", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-promievent": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-eth-abi": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-contract/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-contract/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-contract/node_modules/web3-core-promievent": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", - "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-contract/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-ens": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.2.tgz", - "integrity": "sha512-kTQ42UdNHy4BQJHgWe97bHNMkc3zCMBKKY7t636XOMxdI/lkRdIjdE5nQzt97VjQvSVasgIWYKRAtd8aRaiZiQ==", - "dev": true, - "dependencies": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-promievent": "1.10.2", - "web3-eth-abi": "1.10.2", - "web3-eth-contract": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-ens/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-ens/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-ens/node_modules/web3-core-promievent": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz", - "integrity": "sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-ens/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-iban": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.0.tgz", - "integrity": "sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-iban/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-iban/node_modules/web3-utils": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.0.tgz", - "integrity": "sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-personal": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.2.tgz", - "integrity": "sha512-+vEbJsPUJc5J683y0c2aN645vXC+gPVlFVCQu4IjPvXzJrAtUfz26+IZ6AUOth4fDJPT0f1uSLS5W2yrUdw9BQ==", - "dev": true, - "dependencies": { - "@types/node": "^12.12.6", - "web3-core": "1.10.2", - "web3-core-helpers": "1.10.2", - "web3-core-method": "1.10.2", - "web3-net": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-personal/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "node_modules/web3-eth-personal/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth-personal/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth-personal/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-eth/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-eth/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-net": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.2.tgz", - "integrity": "sha512-w9i1t2z7dItagfskhaCKwpp6W3ylUR88gs68u820y5f8yfK5EbPmHc6c2lD8X9ZrTnmDoeOpIRCN/RFPtZCp+g==", - "dev": true, - "dependencies": { - "web3-core": "1.10.2", - "web3-core-method": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-http": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.2.tgz", - "integrity": "sha512-G8abKtpkyKGpRVKvfjIF3I4O/epHP7mxXWN8mNMQLkQj1cjMFiZBZ13f+qI77lNJN7QOf6+LtNdKrhsTGU72TA==", - "dev": true, - "dependencies": { - "abortcontroller-polyfill": "^1.7.5", - "cross-fetch": "^4.0.0", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-http/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-providers-http/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-http/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-ipc": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.2.tgz", - "integrity": "sha512-lWbn6c+SgvhLymU8u4Ea/WOVC0Gqs7OJUvauejWz+iLycxeF0xFNyXnHVAi42ZJDPVI3vnfZotafoxcNNL7Sug==", - "dev": true, - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-ipc/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-providers-ipc/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-ipc/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-ws": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.2.tgz", - "integrity": "sha512-3nYSiP6grI5GvpkSoehctSywfCTodU21VY8bUtXyFHK/IVfDooNtMpd5lVIMvXVAlaxwwrCfjebokaJtKH2Iag==", - "dev": true, - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.2", - "websocket": "^1.0.32" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-ws/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/web3-providers-ws/node_modules/web3-core-helpers": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz", - "integrity": "sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ==", - "dev": true, - "dependencies": { - "web3-eth-iban": "1.10.2", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-providers-ws/node_modules/web3-eth-iban": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz", - "integrity": "sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/web3-shh": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.2.tgz", - "integrity": "sha512-UP0Kc3pHv9uULFu0+LOVfPwKBSJ6B+sJ5KflF7NyBk6TvNRxlpF3hUhuaVDCjjB/dDUR6T0EQeg25FA2uzJbag==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "web3-core": "1.10.2", - "web3-core-method": "1.10.2", - "web3-core-subscriptions": "1.10.2", - "web3-net": "1.10.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/web3-utils": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.2.tgz", @@ -17015,38 +11782,6 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, - "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "dev": true, - "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/websocket/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/websocket/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -17126,18 +11861,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==", - "dev": true, - "bin": { - "window-size": "cli.js" - }, - "engines": { - "node": ">= 0.10.0" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -17399,60 +12122,6 @@ } } }, - "node_modules/xhr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", - "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", - "dev": true, - "dependencies": { - "global": "~4.4.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "node_modules/xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "dev": true, - "dependencies": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "node_modules/xhr-request-promise": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", - "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", - "dev": true, - "dependencies": { - "xhr-request": "^1.1.0" - } - }, - "node_modules/xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -17462,15 +12131,6 @@ "node": ">=10" } }, - "node_modules/yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", - "dev": true, - "engines": { - "node": ">=0.10.32" - } - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/package.json b/package.json index 644de03b9..f4076433b 100644 --- a/package.json +++ b/package.json @@ -53,24 +53,18 @@ "@changesets/cli": "^2.26.0", "@changesets/pre": "^2.0.0", "@changesets/read": "^0.6.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.0.2", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.4", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-network-helpers": "^1.0.3", "@nomicfoundation/hardhat-toolbox": "^4.0.0", - "@nomiclabs/hardhat-truffle5": "^2.0.5", - "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/docs-utils": "^0.1.5", "@openzeppelin/merkle-tree": "^1.0.5", - "@openzeppelin/test-helpers": "^0.5.13", "@openzeppelin/upgrade-safe-transpiler": "^0.3.32", "@openzeppelin/upgrades-core": "^1.20.6", "chai": "^4.2.0", "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", - "eth-sig-util": "^3.0.0", - "ethereumjs-util": "^7.0.7", - "ethereumjs-wallet": "^1.0.1", "ethers": "^6.7.1", "glob": "^10.3.5", "graphlib": "^2.1.8", @@ -91,7 +85,6 @@ "solidity-coverage": "^0.8.5", "solidity-docgen": "^0.6.0-beta.29", "undici": "^5.22.1", - "web3": "^1.3.0", "yargs": "^17.0.0" } } diff --git a/scripts/generate/templates/Checkpoints.js b/scripts/generate/templates/Checkpoints.js index 321a77489..ed935f17e 100644 --- a/scripts/generate/templates/Checkpoints.js +++ b/scripts/generate/templates/Checkpoints.js @@ -1,5 +1,5 @@ const format = require('../format-lines'); -const { OPTS } = require('./Checkpoints.opts.js'); +const { OPTS } = require('./Checkpoints.opts'); // TEMPLATE const header = `\ diff --git a/scripts/upgradeable/upgradeable.patch b/scripts/upgradeable/upgradeable.patch index c2a5732d9..46893d7d2 100644 --- a/scripts/upgradeable/upgradeable.patch +++ b/scripts/upgradeable/upgradeable.patch @@ -1,6 +1,6 @@ diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 -index 2797a0889..000000000 +index 35ad097ff..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,21 +0,0 @@ @@ -16,7 +16,7 @@ index 2797a0889..000000000 - -**💻 Environment** - -- +- - -**📝 Details** - @@ -59,7 +59,7 @@ index ff596b0c3..000000000 - - diff --git a/README.md b/README.md -index 9ca41573f..57d6e3b5b 100644 +index 35083bc6e..05cf4fc27 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ @@ -73,7 +73,7 @@ index 9ca41573f..57d6e3b5b 100644 ### Installation @@ -26,7 +29,7 @@ - #### Hardhat, Truffle (npm) + #### Hardhat (npm) ``` -$ npm install @openzeppelin/contracts @@ -110,7 +110,7 @@ index 9ca41573f..57d6e3b5b 100644 } ``` diff --git a/contracts/package.json b/contracts/package.json -index be3e741e3..877e942c2 100644 +index 6ab89138a..ece834a44 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,5 +1,5 @@ @@ -118,7 +118,7 @@ index be3e741e3..877e942c2 100644 - "name": "@openzeppelin/contracts", + "name": "@openzeppelin/contracts-upgradeable", "description": "Secure Smart Contract library for Solidity", - "version": "5.0.0", + "version": "5.0.1", "files": [ @@ -13,7 +13,7 @@ }, @@ -140,7 +140,7 @@ index be3e741e3..877e942c2 100644 + } } diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol -index 8e548cdd8..a60ee74fd 100644 +index 77c4c8990..602467f40 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -4,7 +4,6 @@ @@ -307,7 +307,7 @@ index 8e548cdd8..a60ee74fd 100644 } } diff --git a/package.json b/package.json -index c2c3a2675..3301b213d 100644 +index ec2c44ced..46eedc98f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ @@ -328,10 +328,10 @@ index 304d1386a..a1cd63bee 100644 +@openzeppelin/contracts-upgradeable/=contracts/ +@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js -index 75ca00b12..265e6c909 100644 +index 166038b36..268e0d29d 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js -@@ -40,27 +40,6 @@ describe('EIP712', function () { +@@ -47,27 +47,6 @@ describe('EIP712', function () { const rebuildDomain = await getDomain(this.eip712); expect(rebuildDomain).to.be.deep.equal(this.domain); }); diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index e9027cd65..7a0e292bd 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -1,7 +1,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { bigint: time } = require('../helpers/time'); +const time = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); @@ -38,7 +38,7 @@ function shouldBehaveLikeAccessControl() { it('non-admin cannot grant role to other accounts', async function () { await expect(this.mock.connect(this.other).grantRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); it('accounts can be granted a role multiple times', async function () { @@ -68,7 +68,7 @@ function shouldBehaveLikeAccessControl() { it('admin can revoke role', async function () { await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(ROLE, this.authorized.address, this.defaultAdmin.address); + .withArgs(ROLE, this.authorized, this.defaultAdmin); expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); }); @@ -76,7 +76,7 @@ function shouldBehaveLikeAccessControl() { it('non-admin cannot revoke role', async function () { await expect(this.mock.connect(this.other).revokeRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); it('a role can be revoked multiple times', async function () { @@ -106,7 +106,7 @@ function shouldBehaveLikeAccessControl() { it('bearer can renounce role', async function () { await expect(this.mock.connect(this.authorized).renounceRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(ROLE, this.authorized.address, this.authorized.address); + .withArgs(ROLE, this.authorized, this.authorized); expect(await this.mock.hasRole(ROLE, this.authorized)).to.equal(false); }); @@ -145,26 +145,26 @@ function shouldBehaveLikeAccessControl() { it('the new admin can grant roles', async function () { await expect(this.mock.connect(this.otherAdmin).grantRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleGranted') - .withArgs(ROLE, this.authorized.address, this.otherAdmin.address); + .withArgs(ROLE, this.authorized, this.otherAdmin); }); it('the new admin can revoke roles', async function () { await this.mock.connect(this.otherAdmin).grantRole(ROLE, this.authorized); await expect(this.mock.connect(this.otherAdmin).revokeRole(ROLE, this.authorized)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(ROLE, this.authorized.address, this.otherAdmin.address); + .withArgs(ROLE, this.authorized, this.otherAdmin); }); it("a role's previous admins no longer grant roles", async function () { await expect(this.mock.connect(this.defaultAdmin).grantRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.defaultAdmin.address, OTHER_ROLE); + .withArgs(this.defaultAdmin, OTHER_ROLE); }); it("a role's previous admins no longer revoke roles", async function () { await expect(this.mock.connect(this.defaultAdmin).revokeRole(ROLE, this.authorized)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.defaultAdmin.address, OTHER_ROLE); + .withArgs(this.defaultAdmin, OTHER_ROLE); }); }); @@ -180,13 +180,13 @@ function shouldBehaveLikeAccessControl() { it("revert if sender doesn't have role #1", async function () { await expect(this.mock.connect(this.other).$_checkRole(ROLE)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, ROLE); + .withArgs(this.other, ROLE); }); it("revert if sender doesn't have role #2", async function () { await expect(this.mock.connect(this.authorized).$_checkRole(OTHER_ROLE)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.authorized.address, OTHER_ROLE); + .withArgs(this.authorized, OTHER_ROLE); }); }); @@ -271,7 +271,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { describe(`${getter}()`, function () { it('has a default set to the initial default admin', async function () { const value = await this.mock[getter](); - expect(value).to.equal(this.defaultAdmin.address); + expect(value).to.equal(this.defaultAdmin); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, value)).to.be.true; }); @@ -284,7 +284,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer(); const value = await this.mock[getter](); - expect(value).to.equal(this.newDefaultAdmin.address); + expect(value).to.equal(this.newDefaultAdmin); }); }); } @@ -312,7 +312,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await time.increaseTo.timestamp(firstSchedule + fromSchedule); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(newAdmin).to.equal(this.newDefaultAdmin); expect(schedule).to.equal(firstSchedule); }); } @@ -429,7 +429,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); describe('when there is no pending delay nor pending admin transfer', function () { @@ -440,10 +440,10 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await time.increaseTo.timestamp(nextBlockTimestamp, false); // set timestamp but don't mine the block yet await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.emit(this.mock, 'DefaultAdminTransferScheduled') - .withArgs(this.newDefaultAdmin.address, acceptSchedule); + .withArgs(this.newDefaultAdmin, acceptSchedule); const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(newAdmin).to.equal(this.newDefaultAdmin); expect(schedule).to.equal(acceptSchedule); }); }); @@ -470,7 +470,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { ); const newSchedule = (await time.clock.timestamp()) + this.delay; const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.other.address); + expect(newAdmin).to.equal(this.other); expect(schedule).to.equal(newSchedule); }); } @@ -513,11 +513,11 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { const expectedAcceptSchedule = nextBlockTimestamp + expectedDelay; await expect(this.mock.connect(this.defaultAdmin).beginDefaultAdminTransfer(this.newDefaultAdmin)) .to.emit(this.mock, 'DefaultAdminTransferScheduled') - .withArgs(this.newDefaultAdmin.address, expectedAcceptSchedule); + .withArgs(this.newDefaultAdmin, expectedAcceptSchedule); // Check that the schedule corresponds with the new delay const { newAdmin, schedule: transferSchedule } = await this.mock.pendingDefaultAdmin(); - expect(newAdmin).to.equal(this.newDefaultAdmin.address); + expect(newAdmin).to.equal(this.newDefaultAdmin); expect(transferSchedule).to.equal(expectedAcceptSchedule); }); } @@ -534,7 +534,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await time.increaseTo.timestamp(this.acceptSchedule + 1n, false); await expect(this.mock.connect(this.other).acceptDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') - .withArgs(this.other.address); + .withArgs(this.other); }); describe('when caller is pending default admin and delay has passed', function () { @@ -546,14 +546,14 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { // Emit events await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) .to.emit(this.mock, 'RoleRevoked') - .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.newDefaultAdmin.address) + .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin, this.newDefaultAdmin) .to.emit(this.mock, 'RoleGranted') - .withArgs(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin.address, this.newDefaultAdmin.address); + .withArgs(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin, this.newDefaultAdmin); // Storage changes expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.newDefaultAdmin)).to.be.true; - expect(await this.mock.owner()).to.equal(this.newDefaultAdmin.address); + expect(await this.mock.owner()).to.equal(this.newDefaultAdmin); // Resets pending default admin and schedule const { newAdmin, schedule } = await this.mock.pendingDefaultAdmin(); @@ -581,7 +581,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).cancelDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); describe('when there is a pending default admin transfer', function () { @@ -619,7 +619,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { // Previous pending default admin should not be able to accept after cancellation. await expect(this.mock.connect(this.newDefaultAdmin).acceptDefaultAdminTransfer()) .to.be.revertedWithCustomError(this.mock, 'AccessControlInvalidDefaultAdmin') - .withArgs(this.newDefaultAdmin.address); + .withArgs(this.newDefaultAdmin); }); }); @@ -666,14 +666,14 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await this.mock.connect(this.other).renounceRole(DEFAULT_ADMIN_ROLE, this.other); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.true; - expect(await this.mock.defaultAdmin()).to.be.equal(this.defaultAdmin.address); + expect(await this.mock.defaultAdmin()).to.be.equal(this.defaultAdmin); }); it('renounces role', async function () { await time.increaseBy.timestamp(this.delay + 1n, false); await expect(this.mock.connect(this.defaultAdmin).renounceRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)) .to.emit(this.mock, 'RoleRevoked') - .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin.address, this.defaultAdmin.address); + .withArgs(DEFAULT_ADMIN_ROLE, this.defaultAdmin, this.defaultAdmin); expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.false; expect(await this.mock.defaultAdmin()).to.be.equal(ethers.ZeroAddress); @@ -690,7 +690,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { await expect(this.mock.connect(this.defaultAdmin).$_grantRole(DEFAULT_ADMIN_ROLE, this.other)) .to.emit(this.mock, 'RoleGranted') - .withArgs(DEFAULT_ADMIN_ROLE, this.other.address, this.defaultAdmin.address); + .withArgs(DEFAULT_ADMIN_ROLE, this.other, this.defaultAdmin); }); describe('schedule not passed', function () { @@ -712,7 +712,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).changeDefaultAdminDelay(time.duration.hours(4))) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); for (const [delayDifference, delayChangeType] of [ @@ -810,7 +810,7 @@ function shouldBehaveLikeAccessControlDefaultAdminRules() { it('reverts if called by non default admin accounts', async function () { await expect(this.mock.connect(this.other).rollbackDefaultAdminDelay()) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, DEFAULT_ADMIN_ROLE); + .withArgs(this.other, DEFAULT_ADMIN_ROLE); }); describe('when there is a pending delay', function () { diff --git a/test/access/AccessControl.test.js b/test/access/AccessControl.test.js index 6a78e54c2..5c70cdc6d 100644 --- a/test/access/AccessControl.test.js +++ b/test/access/AccessControl.test.js @@ -1,7 +1,7 @@ const { ethers } = require('hardhat'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior.js'); +const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior'); async function fixture() { const [defaultAdmin, ...accounts] = await ethers.getSigners(); diff --git a/test/access/Ownable.test.js b/test/access/Ownable.test.js index d565fc382..2d9b561a1 100644 --- a/test/access/Ownable.test.js +++ b/test/access/Ownable.test.js @@ -16,7 +16,7 @@ describe('Ownable', function () { it('emits ownership transfer events during construction', async function () { await expect(this.ownable.deploymentTransaction()) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(ethers.ZeroAddress, this.owner.address); + .withArgs(ethers.ZeroAddress, this.owner); }); it('rejects zero address for initialOwner', async function () { @@ -26,22 +26,22 @@ describe('Ownable', function () { }); it('has an owner', async function () { - expect(await this.ownable.owner()).to.equal(this.owner.address); + expect(await this.ownable.owner()).to.equal(this.owner); }); describe('transfer ownership', function () { it('changes owner after transfer', async function () { await expect(this.ownable.connect(this.owner).transferOwnership(this.other)) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(this.owner.address, this.other.address); + .withArgs(this.owner, this.other); - expect(await this.ownable.owner()).to.equal(this.other.address); + expect(await this.ownable.owner()).to.equal(this.other); }); it('prevents non-owners from transferring', async function () { await expect(this.ownable.connect(this.other).transferOwnership(this.other)) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); it('guards ownership against stuck state', async function () { @@ -55,7 +55,7 @@ describe('Ownable', function () { it('loses ownership after renouncement', async function () { await expect(this.ownable.connect(this.owner).renounceOwnership()) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(this.owner.address, ethers.ZeroAddress); + .withArgs(this.owner, ethers.ZeroAddress); expect(await this.ownable.owner()).to.equal(ethers.ZeroAddress); }); @@ -63,7 +63,7 @@ describe('Ownable', function () { it('prevents non-owners from renouncement', async function () { await expect(this.ownable.connect(this.other).renounceOwnership()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); it('allows to recover access using the internal _transferOwnership', async function () { @@ -71,9 +71,9 @@ describe('Ownable', function () { await expect(this.ownable.$_transferOwnership(this.other)) .to.emit(this.ownable, 'OwnershipTransferred') - .withArgs(ethers.ZeroAddress, this.other.address); + .withArgs(ethers.ZeroAddress, this.other); - expect(await this.ownable.owner()).to.equal(this.other.address); + expect(await this.ownable.owner()).to.equal(this.other); }); }); }); diff --git a/test/access/Ownable2Step.test.js b/test/access/Ownable2Step.test.js index e77307d98..06a3a2299 100644 --- a/test/access/Ownable2Step.test.js +++ b/test/access/Ownable2Step.test.js @@ -22,10 +22,10 @@ describe('Ownable2Step', function () { it('starting a transfer does not change owner', async function () { await expect(this.ownable2Step.connect(this.owner).transferOwnership(this.accountA)) .to.emit(this.ownable2Step, 'OwnershipTransferStarted') - .withArgs(this.owner.address, this.accountA.address); + .withArgs(this.owner, this.accountA); - expect(await this.ownable2Step.owner()).to.equal(this.owner.address); - expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.owner()).to.equal(this.owner); + expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA); }); it('changes owner after transfer', async function () { @@ -33,9 +33,9 @@ describe('Ownable2Step', function () { await expect(this.ownable2Step.connect(this.accountA).acceptOwnership()) .to.emit(this.ownable2Step, 'OwnershipTransferred') - .withArgs(this.owner.address, this.accountA.address); + .withArgs(this.owner, this.accountA); - expect(await this.ownable2Step.owner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.owner()).to.equal(this.accountA); expect(await this.ownable2Step.pendingOwner()).to.equal(ethers.ZeroAddress); }); @@ -44,7 +44,7 @@ describe('Ownable2Step', function () { await expect(this.ownable2Step.connect(this.accountB).acceptOwnership()) .to.be.revertedWithCustomError(this.ownable2Step, 'OwnableUnauthorizedAccount') - .withArgs(this.accountB.address); + .withArgs(this.accountB); }); }); @@ -52,7 +52,7 @@ describe('Ownable2Step', function () { it('changes owner after renouncing ownership', async function () { await expect(this.ownable2Step.connect(this.owner).renounceOwnership()) .to.emit(this.ownable2Step, 'OwnershipTransferred') - .withArgs(this.owner.address, ethers.ZeroAddress); + .withArgs(this.owner, ethers.ZeroAddress); // If renounceOwnership is removed from parent an alternative is needed ... // without it is difficult to cleanly renounce with the two step process @@ -62,14 +62,14 @@ describe('Ownable2Step', function () { it('pending owner resets after renouncing ownership', async function () { await this.ownable2Step.connect(this.owner).transferOwnership(this.accountA); - expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.pendingOwner()).to.equal(this.accountA); await this.ownable2Step.connect(this.owner).renounceOwnership(); expect(await this.ownable2Step.pendingOwner()).to.equal(ethers.ZeroAddress); await expect(this.ownable2Step.connect(this.accountA).acceptOwnership()) .to.be.revertedWithCustomError(this.ownable2Step, 'OwnableUnauthorizedAccount') - .withArgs(this.accountA.address); + .withArgs(this.accountA); }); it('allows to recover access using the internal _transferOwnership', async function () { @@ -77,9 +77,9 @@ describe('Ownable2Step', function () { await expect(this.ownable2Step.$_transferOwnership(this.accountA)) .to.emit(this.ownable2Step, 'OwnershipTransferred') - .withArgs(ethers.ZeroAddress, this.accountA.address); + .withArgs(ethers.ZeroAddress, this.accountA); - expect(await this.ownable2Step.owner()).to.equal(this.accountA.address); + expect(await this.ownable2Step.owner()).to.equal(this.accountA); }); }); }); diff --git a/test/access/extensions/AccessControlDefaultAdminRules.test.js b/test/access/extensions/AccessControlDefaultAdminRules.test.js index 5b030a3f9..48036fd9b 100644 --- a/test/access/extensions/AccessControlDefaultAdminRules.test.js +++ b/test/access/extensions/AccessControlDefaultAdminRules.test.js @@ -1,11 +1,13 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../../helpers/time'); + +const time = require('../../helpers/time'); const { shouldBehaveLikeAccessControl, shouldBehaveLikeAccessControlDefaultAdminRules, -} = require('../AccessControl.behavior.js'); +} = require('../AccessControl.behavior'); async function fixture() { const delay = time.duration.hours(10); diff --git a/test/access/extensions/AccessControlEnumerable.test.js b/test/access/extensions/AccessControlEnumerable.test.js index a4ad372d5..ea1a8c46f 100644 --- a/test/access/extensions/AccessControlEnumerable.test.js +++ b/test/access/extensions/AccessControlEnumerable.test.js @@ -5,7 +5,7 @@ const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl, shouldBehaveLikeAccessControlEnumerable, -} = require('../AccessControl.behavior.js'); +} = require('../AccessControl.behavior'); async function fixture() { const [defaultAdmin, ...accounts] = await ethers.getSigners(); diff --git a/test/access/manager/AccessManaged.test.js b/test/access/manager/AccessManaged.test.js index 8af07a7dd..d666b5e6d 100644 --- a/test/access/manager/AccessManaged.test.js +++ b/test/access/manager/AccessManaged.test.js @@ -1,8 +1,9 @@ const { ethers } = require('hardhat'); - +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); + const { impersonate } = require('../../helpers/account'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); async function fixture() { const [admin, roleMember, other] = await ethers.getSigners(); @@ -35,7 +36,7 @@ describe('AccessManaged', function () { it('sets authority and emits AuthorityUpdated event during construction', async function () { await expect(this.managed.deploymentTransaction()) .to.emit(this.managed, 'AuthorityUpdated') - .withArgs(this.authority.target); + .withArgs(this.authority); }); describe('restricted modifier', function () { @@ -53,7 +54,7 @@ describe('AccessManaged', function () { it('reverts when role is not granted', async function () { await expect(this.managed.connect(this.other)[this.selector]()) .to.be.revertedWithCustomError(this.managed, 'AccessManagedUnauthorized') - .withArgs(this.other.address); + .withArgs(this.other); }); it('panics in short calldata', async function () { @@ -103,21 +104,21 @@ describe('AccessManaged', function () { it('reverts if the caller is not the authority', async function () { await expect(this.managed.connect(this.other).setAuthority(this.other)) .to.be.revertedWithCustomError(this.managed, 'AccessManagedUnauthorized') - .withArgs(this.other.address); + .withArgs(this.other); }); it('reverts if the new authority is not a valid authority', async function () { await expect(this.managed.connect(this.authorityAsSigner).setAuthority(this.other)) .to.be.revertedWithCustomError(this.managed, 'AccessManagedInvalidAuthority') - .withArgs(this.other.address); + .withArgs(this.other); }); it('sets authority and emits AuthorityUpdated event', async function () { await expect(this.managed.connect(this.authorityAsSigner).setAuthority(this.anotherAuthority)) .to.emit(this.managed, 'AuthorityUpdated') - .withArgs(this.anotherAuthority.target); + .withArgs(this.anotherAuthority); - expect(await this.managed.authority()).to.equal(this.anotherAuthority.target); + expect(await this.managed.authority()).to.equal(this.anotherAuthority); }); }); @@ -136,7 +137,7 @@ describe('AccessManaged', function () { await expect(this.managed.connect(this.other).fnRestricted()) .to.emit(this.authorityObserveIsConsuming, 'ConsumeScheduledOpCalled') .withArgs( - this.other.address, + this.other, this.managed.interface.encodeFunctionData(fnRestricted, []), isConsumingScheduledOp.selector, ); diff --git a/test/access/manager/AccessManager.behavior.js b/test/access/manager/AccessManager.behavior.js index eb26b9a48..c9e236eb0 100644 --- a/test/access/manager/AccessManager.behavior.js +++ b/test/access/manager/AccessManager.behavior.js @@ -1,3 +1,5 @@ +const { expect } = require('chai'); + const { LIKE_COMMON_IS_EXECUTING, LIKE_COMMON_GET_ACCESS, @@ -39,7 +41,7 @@ function shouldBehaveLikeDelayedAdminOperation() { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') .withArgs( - this.caller.address, + this.caller, this.roles.ADMIN.id, // Although PUBLIC is required, target function role doesn't apply to admin ops ); }); @@ -83,7 +85,7 @@ function shouldBehaveLikeNotDelayedAdminOperation() { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') .withArgs( - this.caller.address, + this.caller, this.roles.ADMIN.id, // Although PUBLIC_ROLE is required, admin ops are not subject to target function roles ); }); @@ -123,7 +125,7 @@ function shouldBehaveLikeRoleAdminOperation(roleAdmin) { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, roleAdmin); + .withArgs(this.caller, roleAdmin); }); }, specificRoleIsRequired: getAccessPath, @@ -142,7 +144,7 @@ function shouldBehaveLikeAManagedRestrictedOperation() { it('reverts as AccessManagedUnauthorized', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.target, 'AccessManagedUnauthorized') - .withArgs(this.caller.address); + .withArgs(this.caller); }); } diff --git a/test/access/manager/AccessManager.predicate.js b/test/access/manager/AccessManager.predicate.js index 5bf40a3d7..8b4c5f4b6 100644 --- a/test/access/manager/AccessManager.predicate.js +++ b/test/access/manager/AccessManager.predicate.js @@ -1,9 +1,10 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); const { EXECUTION_ID_STORAGE_SLOT, EXPIRATION, prepareOperation } = require('../../helpers/access-manager'); const { impersonate } = require('../../helpers/account'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); // ============ COMMON PREDICATES ============ @@ -17,7 +18,7 @@ const LIKE_COMMON_IS_EXECUTING = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, }; @@ -30,7 +31,7 @@ const LIKE_COMMON_GET_ACCESS = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, afterGrantDelay: undefined, // Diverges if there's an operation delay or not @@ -40,7 +41,7 @@ const LIKE_COMMON_GET_ACCESS = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, afterGrantDelay() { @@ -71,7 +72,7 @@ const LIKE_COMMON_GET_ACCESS = { it('reverts as AccessManagerUnauthorizedAccount', async function () { await expect(this.caller.sendTransaction({ to: this.target, data: this.calldata })) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedAccount') - .withArgs(this.caller.address, this.role.id); + .withArgs(this.caller, this.role.id); }); }, }; diff --git a/test/access/manager/AccessManager.test.js b/test/access/manager/AccessManager.test.js index ed16dd007..959fd7cda 100644 --- a/test/access/manager/AccessManager.test.js +++ b/test/access/manager/AccessManager.test.js @@ -1,11 +1,11 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { loadFixture, getStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { impersonate } = require('../../helpers/account'); const { MAX_UINT48 } = require('../../helpers/constants'); -const { bigint: time } = require('../../helpers/time'); const { selector } = require('../../helpers/methods'); +const time = require('../../helpers/time'); const { buildBaseRoles, @@ -17,12 +17,14 @@ const { prepareOperation, hashOperation, } = require('../../helpers/access-manager'); + const { shouldBehaveLikeDelayedAdminOperation, shouldBehaveLikeNotDelayedAdminOperation, shouldBehaveLikeRoleAdminOperation, shouldBehaveLikeAManagedRestrictedOperation, } = require('./AccessManager.behavior'); + const { LIKE_COMMON_SCHEDULABLE, testAsClosable, @@ -33,8 +35,6 @@ const { testAsGetAccess, } = require('./AccessManager.predicate'); -const { address: someAddress } = ethers.Wallet.createRandom(); - async function fixture() { const [admin, roleAdmin, roleGuardian, member, user, other] = await ethers.getSigners(); @@ -72,11 +72,8 @@ async function fixture() { } return { - // TODO: Check if all signers are actually used admin, roleAdmin, - roleGuardian, - member, user, other, roles, @@ -99,9 +96,7 @@ async function fixture() { // The predicates can be identified by the `testAs*` prefix while the behaviors // are prefixed with `shouldBehave*`. The common assertions for predicates are // defined as constants. -contract('AccessManager', function () { - // const [admin, manager, guardian, member, user, other] = accounts; - +describe('AccessManager', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); @@ -144,7 +139,7 @@ contract('AccessManager', function () { closed() { it('should return false and no delay', async function () { const { immediate, delay } = await this.manager.canCall( - someAddress, + this.other, this.target, this.calldata.substring(0, 10), ); @@ -763,11 +758,7 @@ contract('AccessManager', function () { describe('#hashOperation', function () { it('returns an operationId', async function () { - const calldata = '0x123543'; - const address = someAddress; - - const args = [this.user.address, address, calldata]; - + const args = [this.user, this.other, '0x123543']; expect(await this.manager.hashOperation(...args)).to.equal(hashOperation(...args)); }); }); @@ -980,7 +971,7 @@ contract('AccessManager', function () { describe('#setTargetAdminDelay', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [someAddress, time.duration.days(3)]; + const args = [this.other.address, time.duration.days(3)]; const method = this.manager.interface.getFunction('setTargetAdminDelay(address,uint32)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -991,50 +982,48 @@ contract('AccessManager', function () { describe('when increasing the delay', function () { const oldDelay = time.duration.days(10); const newDelay = time.duration.days(11); - const target = someAddress; beforeEach('sets old delay', async function () { - await this.manager.$_setTargetAdminDelay(target, oldDelay); + await this.manager.$_setTargetAdminDelay(this.other, oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); }); it('increases the delay after minsetback', async function () { - const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(this.other, newDelay); const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'TargetAdminDelayUpdated') - .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); + .withArgs(this.other, newDelay, setTargetAdminDelayAt + MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(newDelay); }); }); describe('when reducing the delay', function () { const oldDelay = time.duration.days(10); - const target = someAddress; beforeEach('sets old delay', async function () { - await this.manager.$_setTargetAdminDelay(target, oldDelay); + await this.manager.$_setTargetAdminDelay(this.other, oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); }); describe('when the delay difference is shorter than minimum setback', function () { const newDelay = oldDelay - 1n; it('increases the delay after minsetback', async function () { - const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(this.other, newDelay); const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'TargetAdminDelayUpdated') - .withArgs(target, newDelay, setTargetAdminDelayAt + MINSETBACK); + .withArgs(this.other, newDelay, setTargetAdminDelayAt + MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); await time.increaseBy.timestamp(MINSETBACK); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(newDelay); }); }); @@ -1048,16 +1037,16 @@ contract('AccessManager', function () { it('increases the delay after delay difference', async function () { const setback = oldDelay - newDelay; - const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(target, newDelay); + const txResponse = await this.manager.connect(this.admin).setTargetAdminDelay(this.other, newDelay); const setTargetAdminDelayAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'TargetAdminDelayUpdated') - .withArgs(target, newDelay, setTargetAdminDelayAt + setback); + .withArgs(this.other, newDelay, setTargetAdminDelayAt + setback); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(oldDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(oldDelay); await time.increaseBy.timestamp(setback); - expect(await this.manager.getTargetAdminDelay(target)).to.equal(newDelay); + expect(await this.manager.getTargetAdminDelay(this.other)).to.equal(newDelay); }); }); }); @@ -1083,20 +1072,20 @@ contract('AccessManager', function () { }); it('changes the authority', async function () { - expect(await this.newManagedTarget.authority()).to.be.equal(this.manager.target); + expect(await this.newManagedTarget.authority()).to.be.equal(this.manager); await expect(this.manager.connect(this.admin).updateAuthority(this.newManagedTarget, this.newAuthority)) .to.emit(this.newManagedTarget, 'AuthorityUpdated') // Managed contract is responsible of notifying the change through an event - .withArgs(this.newAuthority.target); + .withArgs(this.newAuthority); - expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority.target); + expect(await this.newManagedTarget.authority()).to.be.equal(this.newAuthority); }); }); describe('#setTargetClosed', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [someAddress, true]; + const args = [this.other.address, true]; const method = this.manager.interface.getFunction('setTargetClosed(address,bool)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -1107,26 +1096,26 @@ contract('AccessManager', function () { it('closes and opens a target', async function () { await expect(this.manager.connect(this.admin).setTargetClosed(this.target, true)) .to.emit(this.manager, 'TargetClosed') - .withArgs(this.target.target, true); + .withArgs(this.target, true); expect(await this.manager.isTargetClosed(this.target)).to.be.true; await expect(this.manager.connect(this.admin).setTargetClosed(this.target, false)) .to.emit(this.manager, 'TargetClosed') - .withArgs(this.target.target, false); + .withArgs(this.target, false); expect(await this.manager.isTargetClosed(this.target)).to.be.false; }); it('reverts if closing the manager', async function () { await expect(this.manager.connect(this.admin).setTargetClosed(this.manager, true)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerLockedAccount') - .withArgs(this.manager.target); + .withArgs(this.manager); }); }); describe('#setTargetFunctionRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [someAddress, ['0x12345678'], 443342]; + const args = [this.other.address, ['0x12345678'], 443342]; const method = this.manager.interface.getFunction('setTargetFunctionRole(address,bytes4[],uint64)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -1148,7 +1137,7 @@ contract('AccessManager', function () { for (const sig of sigs) { expect(allowRole) .to.emit(this.manager, 'TargetFunctionRoleUpdated') - .withArgs(this.target.target, sig, this.roles.SOME.id); + .withArgs(this.target, sig, this.roles.SOME.id); expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal(this.roles.SOME.id); } @@ -1156,7 +1145,7 @@ contract('AccessManager', function () { this.manager.connect(this.admin).setTargetFunctionRole(this.target, [sigs[1]], this.roles.SOME_ADMIN.id), ) .to.emit(this.manager, 'TargetFunctionRoleUpdated') - .withArgs(this.target.target, sigs[1], this.roles.SOME_ADMIN.id); + .withArgs(this.target, sigs[1], this.roles.SOME_ADMIN.id); for (const sig of sigs) { expect(await this.manager.getTargetFunctionRole(this.target, sig)).to.equal( @@ -1182,7 +1171,7 @@ contract('AccessManager', function () { describe('#grantRole', function () { describe('restrictions', function () { beforeEach('set method and args', function () { - const args = [ANOTHER_ROLE, someAddress, 0]; + const args = [ANOTHER_ROLE, this.other.address, 0]; const method = this.manager.interface.getFunction('grantRole(uint64,address,uint32)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); }); @@ -1291,7 +1280,7 @@ contract('AccessManager', function () { const grantedAt = await time.clockFromReceipt.timestamp(txResponse); expect(txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs(ANOTHER_ROLE, this.user.address, executionDelay, grantedAt, true); + .withArgs(ANOTHER_ROLE, this.user, executionDelay, grantedAt, true); // Access is correctly stored const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); @@ -1348,7 +1337,7 @@ contract('AccessManager', function () { expect(txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs(ANOTHER_ROLE, this.user.address, timestamp, this.newExecutionDelay, false); + .withArgs(ANOTHER_ROLE, this.user, timestamp, this.newExecutionDelay, false); // Access is correctly stored const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); @@ -1384,13 +1373,7 @@ contract('AccessManager', function () { it('emits event', function () { expect(this.txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs( - ANOTHER_ROLE, - this.user.address, - this.grantTimestamp + this.delay, - this.newExecutionDelay, - false, - ); + .withArgs(ANOTHER_ROLE, this.user, this.grantTimestamp + this.delay, this.newExecutionDelay, false); }); testAsDelay('execution delay effect', { @@ -1465,7 +1448,7 @@ contract('AccessManager', function () { expect(txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs(ANOTHER_ROLE, this.user.address, timestamp, this.newExecutionDelay, false); + .withArgs(ANOTHER_ROLE, this.user, timestamp, this.newExecutionDelay, false); // Access is correctly stored const access = await this.manager.getAccess(ANOTHER_ROLE, this.user); @@ -1501,13 +1484,7 @@ contract('AccessManager', function () { it('emits event', function () { expect(this.txResponse) .to.emit(this.manager, 'RoleGranted') - .withArgs( - ANOTHER_ROLE, - this.user.address, - this.grantTimestamp + this.delay, - this.newExecutionDelay, - false, - ); + .withArgs(ANOTHER_ROLE, this.user, this.grantTimestamp + this.delay, this.newExecutionDelay, false); }); testAsDelay('execution delay effect', { @@ -1557,7 +1534,7 @@ contract('AccessManager', function () { describe('#revokeRole', function () { describe('restrictions', function () { beforeEach('set method and args', async function () { - const args = [ANOTHER_ROLE, someAddress]; + const args = [ANOTHER_ROLE, this.other.address]; const method = this.manager.interface.getFunction('revokeRole(uint64,address)'); this.calldata = this.manager.interface.encodeFunctionData(method, args); @@ -1588,7 +1565,7 @@ contract('AccessManager', function () { await expect(this.manager.connect(this.admin).revokeRole(ANOTHER_ROLE, this.user)) .to.emit(this.manager, 'RoleRevoked') - .withArgs(ANOTHER_ROLE, this.user.address); + .withArgs(ANOTHER_ROLE, this.user); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, @@ -1613,7 +1590,7 @@ contract('AccessManager', function () { await expect(this.manager.connect(this.admin).revokeRole(ANOTHER_ROLE, this.user)) .to.emit(this.manager, 'RoleRevoked') - .withArgs(ANOTHER_ROLE, this.user.address); + .withArgs(ANOTHER_ROLE, this.user); expect(await this.manager.hasRole(ANOTHER_ROLE, this.user).then(formatAccess)).to.be.deep.equal([ false, @@ -1670,7 +1647,7 @@ contract('AccessManager', function () { ]); await expect(this.manager.connect(this.caller).renounceRole(this.role.id, this.caller)) .to.emit(this.manager, 'RoleRevoked') - .withArgs(this.role.id, this.caller.address); + .withArgs(this.role.id, this.caller); expect(await this.manager.hasRole(this.role.id, this.caller).then(formatAccess)).to.be.deep.equal([ false, '0', @@ -1685,7 +1662,7 @@ contract('AccessManager', function () { it('reverts if renouncing with bad caller confirmation', async function () { await expect( - this.manager.connect(this.caller).renounceRole(this.role.id, someAddress), + this.manager.connect(this.caller).renounceRole(this.role.id, this.other), ).to.be.revertedWithCustomError(this.manager, 'AccessManagerBadConfirmation'); }); }); @@ -1719,7 +1696,7 @@ contract('AccessManager', function () { }), ) .to.emit(this.target, 'CalledRestricted') - .withArgs(this.user.address); + .withArgs(this.user); }); }); @@ -1742,7 +1719,7 @@ contract('AccessManager', function () { }), ) .to.emit(this.target, 'CalledUnrestricted') - .withArgs(this.user.address); + .withArgs(this.user); }); }); }); @@ -1772,7 +1749,7 @@ contract('AccessManager', function () { }); await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, open: { @@ -1790,7 +1767,7 @@ contract('AccessManager', function () { }); await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1800,7 +1777,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, specificRoleIsRequired: { @@ -1812,7 +1789,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay() { @@ -1828,7 +1805,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay() { @@ -1836,7 +1813,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1859,7 +1836,7 @@ contract('AccessManager', function () { // prepareOperation is not used here because it alters the next block timestamp await expect(this.manager.connect(this.caller).schedule(this.target, this.calldata, MAX_UINT48)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1874,7 +1851,7 @@ contract('AccessManager', function () { }); await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -1896,7 +1873,7 @@ contract('AccessManager', function () { expect(await this.manager.getSchedule(operationId)).to.equal(scheduledAt + this.delay); expect(txResponse) .to.emit(this.manager, 'OperationScheduled') - .withArgs(operationId, '1', scheduledAt + this.delay, this.target.target, this.calldata); + .withArgs(operationId, '1', scheduledAt + this.delay, this.target, this.calldata); }); it('schedules an operation at the minimum execution date if no specified execution date (when == 0)', async function () { @@ -1911,7 +1888,7 @@ contract('AccessManager', function () { expect(await this.manager.getSchedule(operationId)).to.equal(scheduledAt + executionDelay); expect(txResponse) .to.emit(this.manager, 'OperationScheduled') - .withArgs(operationId, '1', scheduledAt + executionDelay, this.target.target, this.calldata); + .withArgs(operationId, '1', scheduledAt + executionDelay, this.target, this.calldata); }); it('increases the nonce of an operation scheduled more than once', async function () { @@ -1928,14 +1905,7 @@ contract('AccessManager', function () { }); await expect(op1.schedule()) .to.emit(this.manager, 'OperationScheduled') - .withArgs( - op1.operationId, - 1n, - op1.scheduledAt + this.delay, - this.caller.address, - this.target.target, - this.calldata, - ); + .withArgs(op1.operationId, 1n, op1.scheduledAt + this.delay, this.caller, this.target, this.calldata); expect(expectedOperationId).to.equal(op1.operationId); // Consume @@ -1954,14 +1924,7 @@ contract('AccessManager', function () { }); await expect(op2.schedule()) .to.emit(this.manager, 'OperationScheduled') - .withArgs( - op2.operationId, - 2n, - op2.scheduledAt + this.delay, - this.caller.address, - this.target.target, - this.calldata, - ); + .withArgs(op2.operationId, 2n, op2.scheduledAt + this.delay, this.caller, this.target, this.calldata); expect(expectedOperationId).to.equal(op2.operationId); // Check final nonce @@ -1981,7 +1944,7 @@ contract('AccessManager', function () { await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); it('reverts if an operation is already schedule', async function () { @@ -2040,7 +2003,7 @@ contract('AccessManager', function () { await expect(schedule()) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.manager.target, calldata); + .withArgs(this.caller, this.manager, calldata); }); }); @@ -2062,7 +2025,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, open: { @@ -2076,7 +2039,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -2094,7 +2057,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay: function self() { @@ -2112,7 +2075,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, afterGrantDelay: function self() { @@ -2143,7 +2106,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCall', async function () { await expect(this.manager.connect(this.caller).execute(this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.caller.address, this.target.target, this.calldata.substring(0, 10)); + .withArgs(this.caller, this.target, this.calldata.substring(0, 10)); }); }, }, @@ -2197,9 +2160,9 @@ contract('AccessManager', function () { }); it('keeps the original _executionId after finishing the call', async function () { - const executionIdBefore = await getStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT); + const executionIdBefore = await ethers.provider.getStorage(this.manager, EXECUTION_ID_STORAGE_SLOT); await this.manager.connect(this.caller).execute(this.target, this.calldata); - const executionIdAfter = await getStorageAt(this.manager.target, EXECUTION_ID_STORAGE_SLOT); + const executionIdAfter = await ethers.provider.getStorage(this.manager, EXECUTION_ID_STORAGE_SLOT); expect(executionIdBefore).to.equal(executionIdAfter); }); @@ -2244,7 +2207,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedConsume', async function () { await expect(this.manager.connect(this.caller).consumeScheduledOp(this.caller, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedConsume') - .withArgs(this.caller.address); + .withArgs(this.caller); }); }); @@ -2329,7 +2292,7 @@ contract('AccessManager', function () { it('reverts as AccessManagerUnauthorizedCancel', async function () { await expect(this.manager.connect(this.other).cancel(this.caller, this.target, this.calldata)) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCancel') - .withArgs(this.other.address, this.caller.address, this.target.target, this.method.selector); + .withArgs(this.other, this.caller, this.target, this.method.selector); }); }); }, @@ -2379,7 +2342,7 @@ contract('AccessManager', function () { }); it('initial state', async function () { - expect(await this.ownable.owner()).to.be.equal(this.manager.target); + expect(await this.ownable.owner()).to.be.equal(this.manager); }); describe('Contract is closed', function () { @@ -2390,7 +2353,7 @@ contract('AccessManager', function () { it('directly call: reverts', async function () { await expect(this.ownable.connect(this.user).$_checkOwner()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.user.address); + .withArgs(this.user); }); it('relayed call (with role): reverts', async function () { @@ -2398,7 +2361,7 @@ contract('AccessManager', function () { this.manager.connect(this.user).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), ) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.user.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); + .withArgs(this.user, this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); it('relayed call (without role): reverts', async function () { @@ -2406,7 +2369,7 @@ contract('AccessManager', function () { this.manager.connect(this.other).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), ) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.other.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); + .withArgs(this.other, this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); }); @@ -2423,7 +2386,7 @@ contract('AccessManager', function () { it('directly call: reverts', async function () { await expect(this.ownable.connect(this.user).$_checkOwner()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.user.address); + .withArgs(this.user); }); it('relayed call (with role): success', async function () { @@ -2435,7 +2398,7 @@ contract('AccessManager', function () { this.manager.connect(this.other).execute(this.ownable, this.ownable.$_checkOwner.getFragment().selector), ) .to.be.revertedWithCustomError(this.manager, 'AccessManagerUnauthorizedCall') - .withArgs(this.other.address, this.ownable.target, this.ownable.$_checkOwner.getFragment().selector); + .withArgs(this.other, this.ownable, this.ownable.$_checkOwner.getFragment().selector); }); }); @@ -2451,7 +2414,7 @@ contract('AccessManager', function () { it('directly call: reverts', async function () { await expect(this.ownable.connect(this.user).$_checkOwner()) .to.be.revertedWithCustomError(this.ownable, 'OwnableUnauthorizedAccount') - .withArgs(this.user.address); + .withArgs(this.user); }); it('relayed call (with role): success', async function () { diff --git a/test/access/manager/AuthorityUtils.test.js b/test/access/manager/AuthorityUtils.test.js index c17220541..44fa10712 100644 --- a/test/access/manager/AuthorityUtils.test.js +++ b/test/access/manager/AuthorityUtils.test.js @@ -1,4 +1,5 @@ const { ethers } = require('hardhat'); +const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); async function fixture() { diff --git a/test/finance/VestingWallet.behavior.js b/test/finance/VestingWallet.behavior.js index 53c8c565c..a934dc4b0 100644 --- a/test/finance/VestingWallet.behavior.js +++ b/test/finance/VestingWallet.behavior.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const { bigint: time } = require('../helpers/time'); +const time = require('../helpers/time'); function shouldBehaveLikeVesting() { it('check vesting schedule', async function () { diff --git a/test/finance/VestingWallet.test.js b/test/finance/VestingWallet.test.js index 843918fee..eee9041dc 100644 --- a/test/finance/VestingWallet.test.js +++ b/test/finance/VestingWallet.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { min } = require('../helpers/math'); -const { bigint: time } = require('../helpers/time'); +const time = require('../helpers/time'); const { shouldBehaveLikeVesting } = require('./VestingWallet.behavior'); @@ -39,7 +39,7 @@ async function fixture() { }, token: { checkRelease: async (tx, amount) => { - await expect(tx).to.emit(token, 'Transfer').withArgs(mock.target, beneficiary.address, amount); + await expect(tx).to.emit(token, 'Transfer').withArgs(mock, beneficiary, amount); await expect(tx).to.changeTokenBalances(token, [mock, beneficiary], [-amount, amount]); }, setupFailure: async () => { @@ -50,8 +50,8 @@ async function fixture() { }; }, releasedEvent: 'ERC20Released', - argsVerify: [token.target], - args: [ethers.Typed.address(token.target)], + argsVerify: [token], + args: [ethers.Typed.address(token)], }, }; @@ -76,7 +76,7 @@ describe('VestingWallet', function () { }); it('check vesting contract', async function () { - expect(await this.mock.owner()).to.be.equal(this.beneficiary.address); + expect(await this.mock.owner()).to.be.equal(this.beneficiary); expect(await this.mock.start()).to.be.equal(this.start); expect(await this.mock.duration()).to.be.equal(this.duration); expect(await this.mock.end()).to.be.equal(this.start + this.duration); diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index f27e0d9f2..4668e33d5 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -4,8 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../helpers/governance'); const { getDomain, Ballot } = require('../helpers/eip712'); -const { bigint: Enums } = require('../helpers/enums'); -const { bigint: time } = require('../helpers/time'); +const { ProposalState, VoteType } = require('../helpers/enums'); +const time = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); const { shouldBehaveLikeERC6372 } = require('./utils/ERC6372.behavior'); @@ -101,7 +101,7 @@ describe('Governor', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0)).to.equal(0n); @@ -128,7 +128,7 @@ describe('Governor', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.proposer.address, + this.proposer, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -140,21 +140,21 @@ describe('Governor', function () { await this.helper.waitForSnapshot(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For, reason: 'This is nice' })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For, reason: 'This is nice' })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter1.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), 'This is nice'); + .withArgs(this.voter1, this.proposal.id, VoteType.For, ethers.parseEther('10'), 'This is nice'); - await expect(this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter2).vote({ support: VoteType.For })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter2.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('7'), ''); + .withArgs(this.voter2, this.proposal.id, VoteType.For, ethers.parseEther('7'), ''); - await expect(this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against })) + await expect(this.helper.connect(this.voter3).vote({ support: VoteType.Against })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter3.address, this.proposal.id, Enums.VoteType.Against, ethers.parseEther('5'), ''); + .withArgs(this.voter3, this.proposal.id, VoteType.Against, ethers.parseEther('5'), ''); - await expect(this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain })) + await expect(this.helper.connect(this.voter4).vote({ support: VoteType.Abstain })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter4.address, this.proposal.id, Enums.VoteType.Abstain, ethers.parseEther('2'), ''); + .withArgs(this.voter4, this.proposal.id, VoteType.Abstain, ethers.parseEther('2'), ''); await this.helper.waitForDeadline(); @@ -165,7 +165,7 @@ describe('Governor', function () { await expect(txExecute).to.emit(this.receiver, 'MockFunctionCalled'); // After - expect(await this.mock.proposalProposer(this.proposal.id)).to.equal(this.proposer.address); + expect(await this.mock.proposalProposer(this.proposal.id)).to.equal(this.proposer); expect(await this.mock.hasVoted(this.proposal.id, this.owner)).to.be.false; expect(await this.mock.hasVoted(this.proposal.id, this.voter1)).to.be.true; expect(await this.mock.hasVoted(this.proposal.id, this.voter2)).to.be.true; @@ -191,7 +191,7 @@ describe('Governor', function () { await expect(async () => { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); return this.helper.execute(); }).to.changeEtherBalances([this.mock, this.userEOA], [-value, value]); @@ -208,14 +208,14 @@ describe('Governor', function () { await this.helper.waitForSnapshot(); await expect( this.helper.vote({ - support: Enums.VoteType.For, + support: VoteType.For, voter: this.userEOA.address, nonce, signature: signBallot(this.userEOA), }), ) .to.emit(this.mock, 'VoteCast') - .withArgs(this.userEOA.address, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), ''); + .withArgs(this.userEOA, this.proposal.id, VoteType.For, ethers.parseEther('10'), ''); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -237,14 +237,14 @@ describe('Governor', function () { await this.helper.waitForSnapshot(); await expect( this.helper.vote({ - support: Enums.VoteType.For, + support: VoteType.For, voter: wallet.target, nonce, signature: signBallot(this.userEOA), }), ) .to.emit(this.mock, 'VoteCast') - .withArgs(wallet.target, this.proposal.id, Enums.VoteType.For, ethers.parseEther('10'), ''); + .withArgs(wallet, this.proposal.id, VoteType.For, ethers.parseEther('10'), ''); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -266,7 +266,7 @@ describe('Governor', function () { await this.helper.propose(); await expect(this.helper.propose()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') - .withArgs(this.proposal.id, Enums.ProposalState.Pending, ethers.ZeroHash); + .withArgs(this.proposal.id, ProposalState.Pending, ethers.ZeroHash); }); it('if proposer has below threshold votes', async function () { @@ -275,25 +275,25 @@ describe('Governor', function () { await this.mock.$_setProposalThreshold(threshold); await expect(this.helper.connect(this.voter1).propose()) .to.be.revertedWithCustomError(this.mock, 'GovernorInsufficientProposerVotes') - .withArgs(this.voter1.address, votes, threshold); + .withArgs(this.voter1, votes, threshold); }); }); describe('on vote', function () { it('if proposal does not exist', async function () { - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorNonexistentProposal') .withArgs(this.proposal.id); }); it('if voting has not started', async function () { await this.helper.propose(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Pending, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ProposalState.Pending, + GovernorHelper.proposalStatesToBitMap([ProposalState.Active]), ); }); @@ -309,21 +309,21 @@ describe('Governor', function () { it('if vote was already casted', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyCastVote') - .withArgs(this.voter1.address); + .withArgs(this.voter1); }); it('if voting is over', async function () { await this.helper.propose(); await this.helper.waitForDeadline(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Defeated, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ProposalState.Defeated, + GovernorHelper.proposalStatesToBitMap([ProposalState.Active]), ); }); }); @@ -341,13 +341,13 @@ describe('Governor', function () { const nonce = await this.mock.nonces(this.userEOA); function tamper(str, index, mask) { - const arrayStr = ethers.toBeArray(BigInt(str)); + const arrayStr = ethers.getBytes(str); arrayStr[index] ^= mask; return ethers.hexlify(arrayStr); } const voteParams = { - support: Enums.VoteType.For, + support: VoteType.For, voter: this.userEOA.address, nonce, signature: (...args) => signBallot(this.userEOA)(...args).then(sig => tamper(sig, 42, 0xff)), @@ -362,7 +362,7 @@ describe('Governor', function () { const nonce = await this.mock.nonces(this.userEOA); const voteParams = { - support: Enums.VoteType.For, + support: VoteType.For, voter: this.userEOA.address, nonce: nonce + 1n, signature: signBallot(this.userEOA), @@ -378,7 +378,7 @@ describe('Governor', function () { it('always', async function () { await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.queue()).to.be.revertedWithCustomError(this.mock, 'GovernorQueueNotImplemented'); }); @@ -394,39 +394,39 @@ describe('Governor', function () { it('if quorum is not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.For }); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if score not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter1).vote({ support: VoteType.Against }); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if voting is not over', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -443,7 +443,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.be.revertedWithCustomError(this.mock, 'FailedInnerCall'); }); @@ -461,7 +461,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.be.revertedWith('CallReceiverMock: reverting'); }); @@ -469,15 +469,15 @@ describe('Governor', function () { it('if proposal was already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -492,38 +492,38 @@ describe('Governor', function () { it('Pending & Active', async function () { await this.helper.propose(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Pending); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Pending); await this.helper.waitForSnapshot(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Pending); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Pending); await this.helper.waitForSnapshot(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); }); it('Defeated', async function () { await this.helper.propose(); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Defeated); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Defeated); }); it('Succeeded', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Succeeded); }); it('Executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Executed); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Executed); }); }); @@ -539,58 +539,58 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await this.helper.waitForSnapshot(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Active]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Active]), ); }); it('after vote', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await this.helper.waitForDeadline(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('after deadline', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.cancel('internal'); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('after execution', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -598,9 +598,9 @@ describe('Governor', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, + ProposalState.Executed, GovernorHelper.proposalStatesToBitMap( - [Enums.ProposalState.Canceled, Enums.ProposalState.Expired, Enums.ProposalState.Executed], + [ProposalState.Canceled, ProposalState.Expired, ProposalState.Executed], { inverted: true }, ), ); @@ -625,7 +625,7 @@ describe('Governor', function () { await expect(this.helper.connect(this.owner).cancel('external')) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyProposer') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('after vote started', async function () { @@ -636,44 +636,44 @@ describe('Governor', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); it('after vote', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await expect(this.helper.cancel('external')) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Active, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Active, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); it('after deadline', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('external')) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Succeeded, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Succeeded, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); it('after execution', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -681,8 +681,8 @@ describe('Governor', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Pending]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]), ); }); }); @@ -749,7 +749,7 @@ describe('Governor', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.proposer.address, + this.proposer, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -767,7 +767,7 @@ describe('Governor', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.voter1.address, + this.voter1, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -841,19 +841,19 @@ describe('Governor', function () { it('setVotingDelay is protected', async function () { await expect(this.mock.connect(this.owner).setVotingDelay(0n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('setVotingPeriod is protected', async function () { await expect(this.mock.connect(this.owner).setVotingPeriod(32n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('setProposalThreshold is protected', async function () { await expect(this.mock.connect(this.owner).setProposalThreshold(1_000_000_000_000_000_000n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can setVotingDelay through governance', async function () { @@ -869,7 +869,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'VotingDelaySet').withArgs(4n, 0n); @@ -890,7 +890,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'VotingPeriodSet').withArgs(16n, 32n); @@ -913,7 +913,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) @@ -934,7 +934,7 @@ describe('Governor', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) @@ -955,7 +955,7 @@ describe('Governor', function () { }); it('can receive an ERC721 safeTransfer', async function () { - await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock.target, tokenId); + await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, tokenId); }); }); @@ -974,7 +974,7 @@ describe('Governor', function () { it('can receive ERC1155 safeTransfer', async function () { await this.token.connect(this.owner).safeTransferFrom( this.owner, - this.mock.target, + this.mock, ...Object.entries(tokenIds)[0], // id + amount '0x', ); @@ -983,13 +983,7 @@ describe('Governor', function () { it('can receive ERC1155 safeBatchTransfer', async function () { await this.token .connect(this.owner) - .safeBatchTransferFrom( - this.owner, - this.mock.target, - Object.keys(tokenIds), - Object.values(tokenIds), - '0x', - ); + .safeBatchTransferFrom(this.owner, this.mock, Object.keys(tokenIds), Object.values(tokenIds), '0x'); }); }); }); diff --git a/test/governance/TimelockController.test.js b/test/governance/TimelockController.test.js index 709104743..f7ba96c82 100644 --- a/test/governance/TimelockController.test.js +++ b/test/governance/TimelockController.test.js @@ -4,10 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { GovernorHelper } = require('../helpers/governance'); -const { bigint: time } = require('../helpers/time'); -const { - bigint: { OperationState }, -} = require('../helpers/enums'); +const { OperationState } = require('../helpers/enums'); +const time = require('../helpers/time'); const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior'); @@ -234,7 +232,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, PROPOSER_ROLE); + .withArgs(this.other, PROPOSER_ROLE); }); it('enforce minimum delay', async function () { @@ -380,7 +378,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, EXECUTOR_ROLE); + .withArgs(this.other, EXECUTOR_ROLE); }); it('prevents reentrancy execution', async function () { @@ -457,7 +455,7 @@ describe('TimelockController', function () { .withArgs( nonReentrantOperation.id, 0n, - getAddress(nonReentrantOperation.target), + getAddress(nonReentrantOperation), nonReentrantOperation.value, nonReentrantOperation.data, ); @@ -587,7 +585,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, PROPOSER_ROLE); + .withArgs(this.other, PROPOSER_ROLE); }); it('enforce minimum delay', async function () { @@ -725,7 +723,7 @@ describe('TimelockController', function () { ), ) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, EXECUTOR_ROLE); + .withArgs(this.other, EXECUTOR_ROLE); }); it('length mismatch #1', async function () { @@ -939,7 +937,7 @@ describe('TimelockController', function () { it('prevent non-canceller from canceling', async function () { await expect(this.mock.connect(this.other).cancel(this.operation.id)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') - .withArgs(this.other.address, CANCELLER_ROLE); + .withArgs(this.other, CANCELLER_ROLE); }); }); }); @@ -948,7 +946,7 @@ describe('TimelockController', function () { it('prevent unauthorized maintenance', async function () { await expect(this.mock.connect(this.other).updateDelay(0n)) .to.be.revertedWithCustomError(this.mock, 'TimelockUnauthorizedCaller') - .withArgs(this.other.address); + .withArgs(this.other); }); it('timelock scheduled maintenance', async function () { diff --git a/test/governance/extensions/GovernorERC721.test.js b/test/governance/extensions/GovernorERC721.test.js index 0d2a33c73..1ae5508d7 100644 --- a/test/governance/extensions/GovernorERC721.test.js +++ b/test/governance/extensions/GovernorERC721.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); +const { VoteType } = require('../../helpers/enums'); const TOKENS = [ { Token: '$ERC721Votes', mode: 'blocknumber' }, @@ -80,7 +80,7 @@ describe('GovernorERC721', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); @@ -95,21 +95,21 @@ describe('GovernorERC721', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await expect(this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter1).vote({ support: VoteType.For })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter1.address, this.proposal.id, Enums.VoteType.For, 1n, ''); + .withArgs(this.voter1, this.proposal.id, VoteType.For, 1n, ''); - await expect(this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For })) + await expect(this.helper.connect(this.voter2).vote({ support: VoteType.For })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter2.address, this.proposal.id, Enums.VoteType.For, 2n, ''); + .withArgs(this.voter2, this.proposal.id, VoteType.For, 2n, ''); - await expect(this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against })) + await expect(this.helper.connect(this.voter3).vote({ support: VoteType.Against })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter3.address, this.proposal.id, Enums.VoteType.Against, 1n, ''); + .withArgs(this.voter3, this.proposal.id, VoteType.Against, 1n, ''); - await expect(this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain })) + await expect(this.helper.connect(this.voter4).vote({ support: VoteType.Abstain })) .to.emit(this.mock, 'VoteCast') - .withArgs(this.voter4.address, this.proposal.id, Enums.VoteType.Abstain, 1n, ''); + .withArgs(this.voter4, this.proposal.id, VoteType.Abstain, 1n, ''); await this.helper.waitForDeadline(); await this.helper.execute(); diff --git a/test/governance/extensions/GovernorPreventLateQuorum.test.js b/test/governance/extensions/GovernorPreventLateQuorum.test.js index 8defa7014..aac0e6898 100644 --- a/test/governance/extensions/GovernorPreventLateQuorum.test.js +++ b/test/governance/extensions/GovernorPreventLateQuorum.test.js @@ -3,8 +3,8 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -69,7 +69,7 @@ describe('GovernorPreventLateQuorum', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0)).to.equal(quorum); @@ -79,10 +79,10 @@ describe('GovernorPreventLateQuorum', function () { it('nominal workflow unaffected', async function () { const txPropose = await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -107,7 +107,7 @@ describe('GovernorPreventLateQuorum', function () { .to.emit(this.mock, 'ProposalCreated') .withArgs( this.proposal.id, - this.proposer.address, + this.proposer, this.proposal.targets, this.proposal.values, this.proposal.signatures, @@ -128,10 +128,10 @@ describe('GovernorPreventLateQuorum', function () { expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(deadlineTimepoint); // wait for the last minute to vote await this.helper.waitForDeadline(-1n); - const txVote = await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + const txVote = await this.helper.connect(this.voter2).vote({ support: VoteType.For }); // cannot execute yet - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); // compute new extended schedule const extendedDeadline = (await time.clockFromReceipt[mode](txVote)) + lateQuorumVoteExtension; @@ -139,12 +139,12 @@ describe('GovernorPreventLateQuorum', function () { expect(await this.mock.proposalDeadline(this.proposal.id)).to.equal(extendedDeadline); // still possible to vote - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.Against }); + await this.helper.connect(this.voter1).vote({ support: VoteType.Against }); await this.helper.waitForDeadline(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Active); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Active); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Defeated); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Defeated); // check extension event await expect(txVote).to.emit(this.mock, 'ProposalExtended').withArgs(this.proposal.id, extendedDeadline); @@ -154,7 +154,7 @@ describe('GovernorPreventLateQuorum', function () { it('setLateQuorumVoteExtension is protected', async function () { await expect(this.mock.connect(this.owner).setLateQuorumVoteExtension(0n)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can setLateQuorumVoteExtension through governance', async function () { @@ -170,7 +170,7 @@ describe('GovernorPreventLateQuorum', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) diff --git a/test/governance/extensions/GovernorStorage.test.js b/test/governance/extensions/GovernorStorage.test.js index 911c32440..ef56fa53e 100644 --- a/test/governance/extensions/GovernorStorage.test.js +++ b/test/governance/extensions/GovernorStorage.test.js @@ -5,7 +5,7 @@ const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { GovernorHelper, timelockSalt } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); +const { VoteType } = require('../../helpers/enums'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -120,10 +120,10 @@ describe('GovernorStorage', function () { it('queue and execute by id', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); await expect(this.mock.queue(this.proposal.id)) diff --git a/test/governance/extensions/GovernorTimelockAccess.test.js b/test/governance/extensions/GovernorTimelockAccess.test.js index a984a7f5e..f3300c726 100644 --- a/test/governance/extensions/GovernorTimelockAccess.test.js +++ b/test/governance/extensions/GovernorTimelockAccess.test.js @@ -4,11 +4,11 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { hashOperation } = require('../../helpers/access-manager'); const { max } = require('../../helpers/math'); const { selector } = require('../../helpers/methods'); -const { hashOperation } = require('../../helpers/access-manager'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); function prepareOperation({ sender, target, value = 0n, data = '0x' }) { return { @@ -94,12 +94,12 @@ describe('GovernorTimelockAccess', function () { it('post deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.accessManager()).to.equal(this.manager.target); + expect(await this.mock.accessManager()).to.equal(this.manager); }); it('sets base delay (seconds)', async function () { @@ -108,7 +108,7 @@ describe('GovernorTimelockAccess', function () { // Only through governance await expect(this.mock.connect(this.voter1).setBaseDelaySeconds(baseDelay)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.voter1.address); + .withArgs(this.voter1); this.proposal = await this.helper.setProposal( [ @@ -122,7 +122,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'BaseDelaySet').withArgs(0n, baseDelay); @@ -136,7 +136,7 @@ describe('GovernorTimelockAccess', function () { // Only through governance await expect(this.mock.connect(this.voter1).setAccessManagerIgnored(this.other, selectors, true)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.voter1.address); + .withArgs(this.voter1); // Ignore await this.helper.setProposal( @@ -154,14 +154,14 @@ describe('GovernorTimelockAccess', function () { ); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const ignoreReceipt = this.helper.execute(); for (const selector of selectors) { await expect(ignoreReceipt) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.other.address, selector, true); + .withArgs(this.other, selector, true); expect(await this.mock.isAccessManagerIgnored(this.other, selector)).to.be.true; } @@ -182,14 +182,14 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const unignoreReceipt = this.helper.execute(); for (const selector of selectors) { await expect(unignoreReceipt) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.other.address, selector, false); + .withArgs(this.other, selector, false); expect(await this.mock.isAccessManagerIgnored(this.other, selector)).to.be.false; } }); @@ -213,12 +213,12 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const tx = this.helper.execute(); for (const selector of selectors) { - await expect(tx).to.emit(this.mock, 'AccessManagerIgnoredSet').withArgs(this.mock.target, selector, true); + await expect(tx).to.emit(this.mock, 'AccessManagerIgnoredSet').withArgs(this.mock, selector, true); expect(await this.mock.isAccessManagerIgnored(this.mock, selector)).to.be.true; } }); @@ -365,7 +365,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); if (await this.mock.proposalNeedsQueuing(this.proposal.id)) { expect(await this.helper.queue()) @@ -391,7 +391,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await expect(this.helper.execute()) @@ -413,7 +413,7 @@ describe('GovernorTimelockAccess', function () { // Go through all the governance process await original.propose(); await original.waitForSnapshot(); - await original.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await original.connect(this.voter1).vote({ support: VoteType.For }); await original.waitForDeadline(); await original.queue(); await original.waitForEta(); @@ -428,7 +428,7 @@ describe('GovernorTimelockAccess', function () { await rescheduled.setProposal([this.restricted.operation], 'descr'); await rescheduled.propose(); await rescheduled.waitForSnapshot(); - await rescheduled.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await rescheduled.connect(this.voter1).vote({ support: VoteType.For }); await rescheduled.waitForDeadline(); await rescheduled.queue(); // This will schedule it again in the manager await rescheduled.waitForEta(); @@ -450,7 +450,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); @@ -494,7 +494,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); await this.helper.waitForEta(); @@ -539,7 +539,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -555,8 +555,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -568,7 +568,7 @@ describe('GovernorTimelockAccess', function () { // Go through all the governance process await original.propose(); await original.waitForSnapshot(); - await original.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await original.connect(this.voter1).vote({ support: VoteType.For }); await original.waitForDeadline(); await original.queue(); @@ -584,7 +584,7 @@ describe('GovernorTimelockAccess', function () { // Queue the new proposal await rescheduled.propose(); await rescheduled.waitForSnapshot(); - await rescheduled.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await rescheduled.connect(this.voter1).vote({ support: VoteType.For }); await rescheduled.waitForDeadline(); await rescheduled.queue(); // This will schedule it again in the manager @@ -601,8 +601,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( original.currentProposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -611,7 +611,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -627,8 +627,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -637,7 +637,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('internal')) @@ -648,8 +648,8 @@ describe('GovernorTimelockAccess', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -668,7 +668,7 @@ describe('GovernorTimelockAccess', function () { for (const p of [proposal1, proposal2]) { await p.propose(); await p.waitForSnapshot(); - await p.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await p.connect(this.voter1).vote({ support: VoteType.For }); await p.waitForDeadline(); } @@ -717,13 +717,13 @@ describe('GovernorTimelockAccess', function () { it('internal setter', async function () { await expect(this.mock.$_setAccessManagerIgnored(this.receiver, this.restricted.selector, true)) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.receiver.target, this.restricted.selector, true); + .withArgs(this.receiver, this.restricted.selector, true); expect(await this.mock.isAccessManagerIgnored(this.receiver, this.restricted.selector)).to.be.true; await expect(this.mock.$_setAccessManagerIgnored(this.mock, '0x12341234', false)) .to.emit(this.mock, 'AccessManagerIgnoredSet') - .withArgs(this.mock.target, '0x12341234', false); + .withArgs(this.mock, '0x12341234', false); expect(await this.mock.isAccessManagerIgnored(this.mock, '0x12341234')).to.be.false; }); @@ -752,7 +752,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'AccessManagerIgnoredSet'); @@ -787,24 +787,22 @@ describe('GovernorTimelockAccess', function () { await this.helper.setProposal([{ target, data }], 'descr #1'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.manager.target, 0n, amount); + .withArgs(this.manager, 0n, amount); await this.mock.$_setAccessManagerIgnored(target, selector, true); await this.helper.setProposal([{ target, data }], 'descr #2'); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); - await expect(this.helper.execute()) - .to.emit(this.token, 'Transfer') - .withArgs(this.mock.target, this.voter4.address, amount); + await expect(this.helper.execute()).to.emit(this.token, 'Transfer').withArgs(this.mock, this.voter4, amount); }); }); @@ -834,7 +832,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.setProposal([this.operation], `descr`); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -856,7 +854,7 @@ describe('GovernorTimelockAccess', function () { await this.helper.setProposal([this.operation], `descr`); await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); // Don't revert }); diff --git a/test/governance/extensions/GovernorTimelockCompound.test.js b/test/governance/extensions/GovernorTimelockCompound.test.js index ecc71dc09..545bf359d 100644 --- a/test/governance/extensions/GovernorTimelockCompound.test.js +++ b/test/governance/extensions/GovernorTimelockCompound.test.js @@ -4,8 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -81,13 +81,13 @@ describe('GovernorTimelockCompound', function () { it('post deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.timelock()).to.equal(this.timelock.target); - expect(await this.timelock.admin()).to.equal(this.mock.target); + expect(await this.mock.timelock()).to.equal(this.timelock); + expect(await this.timelock.admin()).to.equal(this.mock); }); it('nominal', async function () { @@ -96,10 +96,10 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); const txQueue = await this.helper.queue(); @@ -129,15 +129,15 @@ describe('GovernorTimelockCompound', function () { it('if already queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Queued, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Queued, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); @@ -150,7 +150,7 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyQueuedProposal') @@ -165,10 +165,10 @@ describe('GovernorTimelockCompound', function () { it('if not queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Succeeded); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorNotQueuedProposal') @@ -178,11 +178,11 @@ describe('GovernorTimelockCompound', function () { it('if too early', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Queued); await expect(this.helper.execute()).to.be.rejectedWith( "Timelock::executeTransaction: Transaction hasn't surpassed time lock", @@ -192,26 +192,26 @@ describe('GovernorTimelockCompound', function () { it('if too late', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(time.duration.days(30)); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Expired); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Expired); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Expired, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Expired, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -221,8 +221,8 @@ describe('GovernorTimelockCompound', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -281,28 +281,28 @@ describe('GovernorTimelockCompound', function () { it('cancel before queue prevents scheduling', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('internal')) .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); it('cancel after queue prevents executing', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -310,14 +310,14 @@ describe('GovernorTimelockCompound', function () { .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -335,7 +335,7 @@ describe('GovernorTimelockCompound', function () { .relay(this.token, 0, this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n])), ) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance', async function () { @@ -355,7 +355,7 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -364,7 +364,7 @@ describe('GovernorTimelockCompound', function () { await expect(txExecute).to.changeTokenBalances(this.token, [this.mock, this.other], [-1n, 1n]); - await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.other.address, 1n); + await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock, this.other, 1n); }); }); @@ -376,7 +376,7 @@ describe('GovernorTimelockCompound', function () { it('is protected', async function () { await expect(this.mock.connect(this.owner).updateTimelock(this.newTimelock)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance to', async function () { @@ -396,16 +396,16 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await expect(this.helper.execute()) .to.emit(this.mock, 'TimelockChange') - .withArgs(this.timelock.target, this.newTimelock.target); + .withArgs(this.timelock, this.newTimelock); - expect(await this.mock.timelock()).to.equal(this.newTimelock.target); + expect(await this.mock.timelock()).to.equal(this.newTimelock); }); }); @@ -432,15 +432,15 @@ describe('GovernorTimelockCompound', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); - await expect(this.helper.execute()).to.emit(this.timelock, 'NewPendingAdmin').withArgs(newGovernor.target); + await expect(this.helper.execute()).to.emit(this.timelock, 'NewPendingAdmin').withArgs(newGovernor); await newGovernor.__acceptAdmin(); - expect(await this.timelock.admin()).to.equal(newGovernor.target); + expect(await this.timelock.admin()).to.equal(newGovernor); }); }); }); diff --git a/test/governance/extensions/GovernorTimelockControl.test.js b/test/governance/extensions/GovernorTimelockControl.test.js index 71c2b188c..e492d854c 100644 --- a/test/governance/extensions/GovernorTimelockControl.test.js +++ b/test/governance/extensions/GovernorTimelockControl.test.js @@ -4,8 +4,8 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { GovernorHelper, timelockSalt } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { OperationState, ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -95,12 +95,12 @@ describe('GovernorTimelockControl', function () { it('post deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0n)).to.equal(0n); - expect(await this.mock.timelock()).to.equal(this.timelock.target); + expect(await this.mock.timelock()).to.equal(this.timelock); }); it('nominal', async function () { @@ -109,10 +109,10 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); expect(await this.mock.proposalNeedsQueuing(this.proposal.id)).to.be.true; @@ -145,15 +145,15 @@ describe('GovernorTimelockControl', function () { it('if already queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Queued, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Queued, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); }); @@ -162,34 +162,34 @@ describe('GovernorTimelockControl', function () { it('if not queued', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(1n); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Succeeded); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Succeeded); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.timelock, 'TimelockUnexpectedOperationState') - .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(Enums.OperationState.Ready)); + .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); it('if too early', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Queued); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.timelock, 'TimelockUnexpectedOperationState') - .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(Enums.OperationState.Ready)); + .withArgs(this.proposal.timelockid, GovernorHelper.proposalStatesToBitMap(OperationState.Ready)); }); it('if already executed', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -199,15 +199,15 @@ describe('GovernorTimelockControl', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('if already executed by another proposer', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -222,8 +222,8 @@ describe('GovernorTimelockControl', function () { .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Executed, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Executed, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); }); @@ -233,28 +233,28 @@ describe('GovernorTimelockControl', function () { it('cancel before queue prevents scheduling', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.cancel('internal')) .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.queue()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded]), ); }); it('cancel after queue prevents executing', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); @@ -262,31 +262,31 @@ describe('GovernorTimelockControl', function () { .to.emit(this.mock, 'ProposalCanceled') .withArgs(this.proposal.id); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Canceled, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Canceled, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); it('cancel on timelock is reflected on governor', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Queued); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Queued); await expect(this.timelock.connect(this.owner).cancel(this.proposal.timelockid)) .to.emit(this.timelock, 'Cancelled') .withArgs(this.proposal.timelockid); - expect(await this.mock.state(this.proposal.id)).to.equal(Enums.ProposalState.Canceled); + expect(await this.mock.state(this.proposal.id)).to.equal(ProposalState.Canceled); }); }); @@ -303,7 +303,7 @@ describe('GovernorTimelockControl', function () { .relay(this.token, 0n, this.token.interface.encodeFunctionData('transfer', [this.other.address, 1n])), ) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance', async function () { @@ -323,7 +323,7 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -332,7 +332,7 @@ describe('GovernorTimelockControl', function () { await expect(txExecute).to.changeTokenBalances(this.token, [this.mock, this.other], [-1n, 1n]); - await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock.target, this.other.address, 1n); + await expect(txExecute).to.emit(this.token, 'Transfer').withArgs(this.mock, this.other, 1n); }); it('is payable and can transfer eth to EOA', async function () { @@ -352,7 +352,7 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); @@ -397,7 +397,7 @@ describe('GovernorTimelockControl', function () { it('is protected', async function () { await expect(this.mock.connect(this.owner).updateTimelock(this.newTimelock)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can be executed through governance to', async function () { @@ -413,16 +413,16 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); await expect(this.helper.execute()) .to.emit(this.mock, 'TimelockChange') - .withArgs(this.timelock.target, this.newTimelock.target); + .withArgs(this.timelock, this.newTimelock); - expect(await this.mock.timelock()).to.equal(this.newTimelock.target); + expect(await this.mock.timelock()).to.equal(this.newTimelock); }); }); @@ -489,7 +489,7 @@ describe('GovernorTimelockControl', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.queue(); await this.helper.waitForEta(); diff --git a/test/governance/extensions/GovernorVotesQuorumFraction.test.js b/test/governance/extensions/GovernorVotesQuorumFraction.test.js index cae4c76f0..db728f0a6 100644 --- a/test/governance/extensions/GovernorVotesQuorumFraction.test.js +++ b/test/governance/extensions/GovernorVotesQuorumFraction.test.js @@ -3,8 +3,8 @@ const { expect } = require('chai'); const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); -const { bigint: time } = require('../../helpers/time'); +const { ProposalState, VoteType } = require('../../helpers/enums'); +const time = require('../../helpers/time'); const TOKENS = [ { Token: '$ERC20Votes', mode: 'blocknumber' }, @@ -63,7 +63,7 @@ describe('GovernorVotesQuorumFraction', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); expect(await this.mock.quorum(0)).to.equal(0n); @@ -77,7 +77,7 @@ describe('GovernorVotesQuorumFraction', function () { it('quroum reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await this.helper.execute(); }); @@ -85,14 +85,14 @@ describe('GovernorVotesQuorumFraction', function () { it('quroum not reached', async function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()) .to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState') .withArgs( this.proposal.id, - Enums.ProposalState.Defeated, - GovernorHelper.proposalStatesToBitMap([Enums.ProposalState.Succeeded, Enums.ProposalState.Queued]), + ProposalState.Defeated, + GovernorHelper.proposalStatesToBitMap([ProposalState.Succeeded, ProposalState.Queued]), ); }); @@ -100,7 +100,7 @@ describe('GovernorVotesQuorumFraction', function () { it('updateQuorumNumerator is protected', async function () { await expect(this.mock.connect(this.owner).updateQuorumNumerator(newRatio)) .to.be.revertedWithCustomError(this.mock, 'GovernorOnlyExecutor') - .withArgs(this.owner.address); + .withArgs(this.owner); }); it('can updateQuorumNumerator through governance', async function () { @@ -116,7 +116,7 @@ describe('GovernorVotesQuorumFraction', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); await expect(this.helper.execute()).to.emit(this.mock, 'QuorumNumeratorUpdated').withArgs(ratio, newRatio); @@ -150,7 +150,7 @@ describe('GovernorVotesQuorumFraction', function () { await this.helper.propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For }); await this.helper.waitForDeadline(); const quorumDenominator = await this.mock.quorumDenominator(); diff --git a/test/governance/extensions/GovernorWithParams.test.js b/test/governance/extensions/GovernorWithParams.test.js index 194a8aa6f..37e15f5c2 100644 --- a/test/governance/extensions/GovernorWithParams.test.js +++ b/test/governance/extensions/GovernorWithParams.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { GovernorHelper } = require('../../helpers/governance'); -const { bigint: Enums } = require('../../helpers/enums'); +const { VoteType } = require('../../helpers/enums'); const { getDomain, ExtendedBallot } = require('../../helpers/eip712'); const TOKENS = [ @@ -65,7 +65,7 @@ describe('GovernorWithParams', function () { it('deployment check', async function () { expect(await this.mock.name()).to.equal(name); - expect(await this.mock.token()).to.equal(this.token.target); + expect(await this.mock.token()).to.equal(this.token); expect(await this.mock.votingDelay()).to.equal(votingDelay); expect(await this.mock.votingPeriod()).to.equal(votingPeriod); }); @@ -73,10 +73,10 @@ describe('GovernorWithParams', function () { it('nominal is unaffected', async function () { await this.helper.connect(this.proposer).propose(); await this.helper.waitForSnapshot(); - await this.helper.connect(this.voter1).vote({ support: Enums.VoteType.For, reason: 'This is nice' }); - await this.helper.connect(this.voter2).vote({ support: Enums.VoteType.For }); - await this.helper.connect(this.voter3).vote({ support: Enums.VoteType.Against }); - await this.helper.connect(this.voter4).vote({ support: Enums.VoteType.Abstain }); + await this.helper.connect(this.voter1).vote({ support: VoteType.For, reason: 'This is nice' }); + await this.helper.connect(this.voter2).vote({ support: VoteType.For }); + await this.helper.connect(this.voter3).vote({ support: VoteType.Against }); + await this.helper.connect(this.voter4).vote({ support: VoteType.Abstain }); await this.helper.waitForDeadline(); await this.helper.execute(); @@ -95,7 +95,7 @@ describe('GovernorWithParams', function () { await expect( this.helper.connect(this.voter2).vote({ - support: Enums.VoteType.For, + support: VoteType.For, reason: 'no particular reason', params: params.encoded, }), @@ -106,7 +106,7 @@ describe('GovernorWithParams', function () { .withArgs( this.voter2.address, this.proposal.id, - Enums.VoteType.For, + VoteType.For, weight, 'no particular reason', params.encoded, @@ -128,7 +128,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: this.other.address, nonce, reason: 'no particular reason', @@ -161,7 +161,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: wallet.target, nonce, reason: 'no particular reason', @@ -192,7 +192,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: this.other.address, nonce, reason: 'no particular reason', @@ -225,7 +225,7 @@ describe('GovernorWithParams', function () { const nonce = await this.mock.nonces(this.other); const data = { proposalId: this.proposal.id, - support: Enums.VoteType.For, + support: VoteType.For, voter: this.other.address, nonce: nonce + 1n, reason: 'no particular reason', diff --git a/test/governance/utils/ERC6372.behavior.js b/test/governance/utils/ERC6372.behavior.js index b5a6cb13c..abcae43c7 100644 --- a/test/governance/utils/ERC6372.behavior.js +++ b/test/governance/utils/ERC6372.behavior.js @@ -1,4 +1,6 @@ -const { bigint: time } = require('../../helpers/time'); +const { expect } = require('chai'); + +const time = require('../../helpers/time'); function shouldBehaveLikeERC6372(mode = 'blocknumber') { describe('should implement ERC-6372', function () { diff --git a/test/governance/utils/Votes.behavior.js b/test/governance/utils/Votes.behavior.js index be3a87db5..099770132 100644 --- a/test/governance/utils/Votes.behavior.js +++ b/test/governance/utils/Votes.behavior.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { mine } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, Delegation } = require('../../helpers/eip712'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior'); @@ -30,10 +30,10 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(this.votes.connect(this.alice).delegate(this.alice)) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.alice.address, ethers.ZeroAddress, this.alice.address) + .withArgs(this.alice, ethers.ZeroAddress, this.alice) .to.not.emit(this.votes, 'DelegateVotesChanged'); - expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice); }); it('delegation with tokens', async function () { @@ -47,11 +47,11 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(tx) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.alice.address, ethers.ZeroAddress, this.alice.address) + .withArgs(this.alice, ethers.ZeroAddress, this.alice) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.alice.address, 0n, weight); + .withArgs(this.alice, 0n, weight); - expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice); expect(await this.votes.getVotes(this.alice)).to.equal(weight); expect(await this.votes.getPastVotes(this.alice, timepoint - 1n)).to.equal(0n); await mine(); @@ -63,7 +63,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await this.votes.$_mint(this.alice, token); const weight = getWeight(token); - expect(await this.votes.delegates(this.alice)).to.equal(this.alice.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.alice); expect(await this.votes.getVotes(this.alice)).to.equal(weight); expect(await this.votes.getVotes(this.bob)).to.equal(0); @@ -72,13 +72,13 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(tx) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.alice.address, this.alice.address, this.bob.address) + .withArgs(this.alice, this.alice, this.bob) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.alice.address, weight, 0) + .withArgs(this.alice, weight, 0) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.bob.address, 0, weight); + .withArgs(this.bob, 0, weight); - expect(await this.votes.delegates(this.alice)).to.equal(this.bob.address); + expect(await this.votes.delegates(this.alice)).to.equal(this.bob); expect(await this.votes.getVotes(this.alice)).to.equal(0n); expect(await this.votes.getVotes(this.bob)).to.equal(weight); @@ -93,7 +93,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } const nonce = 0n; it('accept signed delegation', async function () { - await this.votes.$_mint(this.delegator.address, token); + await this.votes.$_mint(this.delegator, token); const weight = getWeight(token); const { r, s, v } = await this.delegator @@ -108,18 +108,18 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } ) .then(ethers.Signature.from); - expect(await this.votes.delegates(this.delegator.address)).to.equal(ethers.ZeroAddress); + expect(await this.votes.delegates(this.delegator)).to.equal(ethers.ZeroAddress); const tx = await this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s); const timepoint = await time.clockFromReceipt[mode](tx); await expect(tx) .to.emit(this.votes, 'DelegateChanged') - .withArgs(this.delegator.address, ethers.ZeroAddress, this.delegatee.address) + .withArgs(this.delegator, ethers.ZeroAddress, this.delegatee) .to.emit(this.votes, 'DelegateVotesChanged') - .withArgs(this.delegatee.address, 0, weight); + .withArgs(this.delegatee, 0, weight); - expect(await this.votes.delegates(this.delegator.address)).to.equal(this.delegatee.address); + expect(await this.votes.delegates(this.delegator.address)).to.equal(this.delegatee); expect(await this.votes.getVotes(this.delegator.address)).to.equal(0n); expect(await this.votes.getVotes(this.delegatee)).to.equal(weight); expect(await this.votes.getPastVotes(this.delegatee, timepoint - 1n)).to.equal(0n); @@ -144,7 +144,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(this.votes.delegateBySig(this.delegatee, nonce, ethers.MaxUint256, v, r, s)) .to.be.revertedWithCustomError(this.votes, 'InvalidAccountNonce') - .withArgs(this.delegator.address, nonce + 1n); + .withArgs(this.delegator, nonce + 1n); }); it('rejects bad delegatee', async function () { @@ -167,9 +167,9 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } log => this.votes.interface.parseLog(log)?.name === 'DelegateChanged', ); const { args } = this.votes.interface.parseLog(delegateChanged); - expect(args.delegator).to.not.be.equal(this.delegator.address); + expect(args.delegator).to.not.be.equal(this.delegator); expect(args.fromDelegate).to.equal(ethers.ZeroAddress); - expect(args.toDelegate).to.equal(this.other.address); + expect(args.toDelegate).to.equal(this.other); }); it('rejects bad nonce', async function () { @@ -187,7 +187,7 @@ function shouldBehaveLikeVotes(tokens, { mode = 'blocknumber', fungible = true } await expect(this.votes.delegateBySig(this.delegatee, nonce + 1n, ethers.MaxUint256, v, r, s)) .to.be.revertedWithCustomError(this.votes, 'InvalidAccountNonce') - .withArgs(this.delegator.address, 0); + .withArgs(this.delegator, 0); }); it('rejects expired permit', async function () { diff --git a/test/governance/utils/Votes.test.js b/test/governance/utils/Votes.test.js index c133609bc..7acacfc66 100644 --- a/test/governance/utils/Votes.test.js +++ b/test/governance/utils/Votes.test.js @@ -4,7 +4,7 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { sum } = require('../../helpers/math'); const { zip } = require('../../helpers/iterate'); -const { bigint: time } = require('../../helpers/time'); +const time = require('../../helpers/time'); const { shouldBehaveLikeVotes } = require('./Votes.behavior'); @@ -71,7 +71,7 @@ describe('Votes', function () { expect(await this.votes.getVotes(this.accounts[0])).to.equal(this.amounts[this.accounts[0].address]); expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); - expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0].address); + expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0]); expect(await this.votes.delegates(this.accounts[1])).to.equal(ethers.ZeroAddress); await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0])); @@ -80,13 +80,13 @@ describe('Votes', function () { this.amounts[this.accounts[0].address] + this.amounts[this.accounts[1].address], ); expect(await this.votes.getVotes(this.accounts[1])).to.equal(0n); - expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0].address); - expect(await this.votes.delegates(this.accounts[1])).to.equal(this.accounts[0].address); + expect(await this.votes.delegates(this.accounts[0])).to.equal(this.accounts[0]); + expect(await this.votes.delegates(this.accounts[1])).to.equal(this.accounts[0]); }); it('cross delegates', async function () { - await this.votes.delegate(this.accounts[0], ethers.Typed.address(this.accounts[1].address)); - await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0].address)); + await this.votes.delegate(this.accounts[0], ethers.Typed.address(this.accounts[1])); + await this.votes.delegate(this.accounts[1], ethers.Typed.address(this.accounts[0])); expect(await this.votes.getVotes(this.accounts[0])).to.equal(this.amounts[this.accounts[1].address]); expect(await this.votes.getVotes(this.accounts[1])).to.equal(this.amounts[this.accounts[0].address]); diff --git a/test/helpers/access-manager.js b/test/helpers/access-manager.js index e08b48d4e..3b8343059 100644 --- a/test/helpers/access-manager.js +++ b/test/helpers/access-manager.js @@ -1,7 +1,8 @@ const { ethers } = require('hardhat'); + const { MAX_UINT64 } = require('./constants'); -const { namespaceSlot } = require('./namespaced-storage'); -const { bigint: time } = require('./time'); +const time = require('./time'); +const { upgradeableSlot } = require('./storage'); function buildBaseRoles() { const roles = { @@ -45,8 +46,8 @@ const formatAccess = access => [access[0], access[1].toString()]; const MINSETBACK = time.duration.days(5); const EXPIRATION = time.duration.weeks(1); -const EXECUTION_ID_STORAGE_SLOT = namespaceSlot('AccessManager', 3n); -const CONSUMING_SCHEDULE_STORAGE_SLOT = namespaceSlot('AccessManaged', 0n); +const EXECUTION_ID_STORAGE_SLOT = upgradeableSlot('AccessManager', 3n); +const CONSUMING_SCHEDULE_STORAGE_SLOT = upgradeableSlot('AccessManaged', 0n); /** * @requires this.{manager, caller, target, calldata} diff --git a/test/helpers/chainid.js b/test/helpers/chainid.js deleted file mode 100644 index e8181d55c..000000000 --- a/test/helpers/chainid.js +++ /dev/null @@ -1,6 +0,0 @@ -const { ethers } = require('hardhat'); - -module.exports = { - // TODO: remove conversion toNumber() when bigint are supported - getChainId: () => ethers.provider.getNetwork().then(network => ethers.toNumber(network.chainId)), -}; diff --git a/test/helpers/eip712.js b/test/helpers/eip712.js index 278e86cce..3843ac026 100644 --- a/test/helpers/eip712.js +++ b/test/helpers/eip712.js @@ -1,4 +1,4 @@ -const { ethers } = require('ethers'); +const { ethers } = require('hardhat'); const types = require('./eip712-types'); async function getDomain(contract) { @@ -11,8 +11,7 @@ async function getDomain(contract) { const domain = { name, version, - // TODO: remove check when contracts are all migrated to ethers - chainId: web3.utils.isBN(chainId) ? chainId.toNumber() : chainId, + chainId, verifyingContract, salt, }; diff --git a/test/helpers/enums.js b/test/helpers/enums.js index 9a5d6b263..bb237796a 100644 --- a/test/helpers/enums.js +++ b/test/helpers/enums.js @@ -1,22 +1,12 @@ function Enum(...options) { - return Object.fromEntries(options.map((key, i) => [key, web3.utils.toBN(i)])); -} - -function EnumBigInt(...options) { return Object.fromEntries(options.map((key, i) => [key, BigInt(i)])); } -// TODO: remove web3, simplify code -function createExport(Enum) { - return { - Enum, - ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), - VoteType: Enum('Against', 'For', 'Abstain'), - Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), - OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), - RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), - }; -} - -module.exports = createExport(Enum); -module.exports.bigint = createExport(EnumBigInt); +module.exports = { + Enum, + ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), + VoteType: Enum('Against', 'For', 'Abstain'), + Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), + OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), + RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), +}; diff --git a/test/helpers/governance.js b/test/helpers/governance.js index 0efb3da5c..cc219323b 100644 --- a/test/helpers/governance.js +++ b/test/helpers/governance.js @@ -172,7 +172,7 @@ class GovernorHelper { if (!Array.isArray(proposalStates)) { proposalStates = [proposalStates]; } - const statesCount = BigInt(Object.keys(ProposalState).length); + const statesCount = ethers.toBigInt(Object.keys(ProposalState).length); let result = 0n; for (const state of unique(...proposalStates)) { diff --git a/test/helpers/math.js b/test/helpers/math.js index 708990519..f8a1520ee 100644 --- a/test/helpers/math.js +++ b/test/helpers/math.js @@ -4,10 +4,7 @@ const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), val const sum = (...values) => values.slice(1).reduce((x, y) => x + y, values.at(0)); module.exports = { - // re-export min, max & sum of integer / bignumber min, max, sum, - // deprecated: BN version of sum - BNsum: (...args) => args.slice(1).reduce((x, y) => x.add(y), args.at(0)), }; diff --git a/test/helpers/namespaced-storage.js b/test/helpers/namespaced-storage.js deleted file mode 100644 index eccec3b52..000000000 --- a/test/helpers/namespaced-storage.js +++ /dev/null @@ -1,22 +0,0 @@ -const { ethers, artifacts } = require('hardhat'); -const { erc7201slot } = require('./erc1967'); - -function namespaceId(contractName) { - return `openzeppelin.storage.${contractName}`; -} - -function namespaceSlot(contractName, offset) { - try { - // Try to get the artifact paths, will throw if it doesn't exist - artifacts._getArtifactPathSync(`${contractName}Upgradeable`); - return offset + ethers.toBigInt(erc7201slot(namespaceId(contractName))); - } catch (_) { - return offset; - } -} - -module.exports = { - namespaceSlot, - namespaceLocation: erc7201slot, - namespaceId, -}; diff --git a/test/helpers/erc1967.js b/test/helpers/storage.js similarity index 66% rename from test/helpers/erc1967.js rename to test/helpers/storage.js index 88a87d661..2b6882002 100644 --- a/test/helpers/erc1967.js +++ b/test/helpers/storage.js @@ -1,5 +1,5 @@ const { ethers } = require('hardhat'); -const { getStorageAt, setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); +const { setStorageAt } = require('@nomicfoundation/hardhat-network-helpers'); const ImplementationLabel = 'eip1967.proxy.implementation'; const AdminLabel = 'eip1967.proxy.admin'; @@ -7,11 +7,10 @@ const BeaconLabel = 'eip1967.proxy.beacon'; const erc1967slot = label => ethers.toBeHex(ethers.toBigInt(ethers.id(label)) - 1n); const erc7201slot = label => ethers.toBeHex(ethers.toBigInt(ethers.keccak256(erc1967slot(label))) & ~0xffn); +const erc7201format = contractName => `openzeppelin.storage.${contractName}`; const getSlot = (address, slot) => - (ethers.isAddressable(address) ? address.getAddress() : Promise.resolve(address)).then(address => - getStorageAt(address, ethers.isBytesLike(slot) ? slot : erc1967slot(slot)), - ); + ethers.provider.getStorage(address, ethers.isBytesLike(slot) ? slot : erc1967slot(slot)); const setSlot = (address, slot, value) => Promise.all([ @@ -22,6 +21,16 @@ const setSlot = (address, slot, value) => const getAddressInSlot = (address, slot) => getSlot(address, slot).then(slotValue => ethers.AbiCoder.defaultAbiCoder().decode(['address'], slotValue)[0]); +const upgradeableSlot = (contractName, offset) => { + try { + // Try to get the artifact paths, will throw if it doesn't exist + artifacts._getArtifactPathSync(`${contractName}Upgradeable`); + return offset + ethers.toBigInt(erc7201slot(erc7201format(contractName))); + } catch (_) { + return offset; + } +}; + module.exports = { ImplementationLabel, AdminLabel, @@ -31,7 +40,9 @@ module.exports = { BeaconSlot: erc1967slot(BeaconLabel), erc1967slot, erc7201slot, + erc7201format, setSlot, getSlot, getAddressInSlot, + upgradeableSlot, }; diff --git a/test/helpers/time.js b/test/helpers/time.js index db72f2063..f6ccc3cab 100644 --- a/test/helpers/time.js +++ b/test/helpers/time.js @@ -3,12 +3,12 @@ const { time, mine, mineUpTo } = require('@nomicfoundation/hardhat-network-helpe const { mapValues } = require('./iterate'); const clock = { - blocknumber: () => time.latestBlock(), - timestamp: () => time.latest(), + blocknumber: () => time.latestBlock().then(ethers.toBigInt), + timestamp: () => time.latest().then(ethers.toBigInt), }; const clockFromReceipt = { - blocknumber: receipt => Promise.resolve(receipt.blockNumber), - timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => block.timestamp), + blocknumber: receipt => Promise.resolve(ethers.toBigInt(receipt.blockNumber)), + timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => ethers.toBigInt(block.timestamp)), }; const increaseBy = { blockNumber: mine, @@ -19,7 +19,7 @@ const increaseTo = { blocknumber: mineUpTo, timestamp: (to, mine = true) => (mine ? time.increaseTo(to) : time.setNextBlockTimestamp(to)), }; -const duration = time.duration; +const duration = mapValues(time.duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))); module.exports = { clock, @@ -28,12 +28,3 @@ module.exports = { increaseTo, duration, }; - -// TODO: deprecate the old version in favor of this one -module.exports.bigint = { - clock: mapValues(clock, fn => () => fn().then(ethers.toBigInt)), - clockFromReceipt: mapValues(clockFromReceipt, fn => receipt => fn(receipt).then(ethers.toBigInt)), - increaseBy: increaseBy, - increaseTo: increaseTo, - duration: mapValues(duration, fn => n => ethers.toBigInt(fn(ethers.toNumber(n)))), -}; diff --git a/test/helpers/txpool.js b/test/helpers/txpool.js index b6e960c10..f01327b22 100644 --- a/test/helpers/txpool.js +++ b/test/helpers/txpool.js @@ -1,5 +1,7 @@ const { network } = require('hardhat'); +const { expect } = require('chai'); const { mine } = require('@nomicfoundation/hardhat-network-helpers'); + const { unique } = require('./iterate'); async function batchInBlock(txs) { diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index 07c4ff335..2b69a486c 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -30,7 +30,7 @@ describe('ERC2771Context', function () { }); it('returns the trusted forwarder', async function () { - expect(await this.context.trustedForwarder()).to.equal(this.forwarder.target); + expect(await this.context.trustedForwarder()).to.equal(this.forwarder); }); describe('when called directly', function () { @@ -57,14 +57,14 @@ describe('ERC2771Context', function () { expect(await this.forwarder.verify(req)).to.equal(true); - await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender.address); + await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender); }); it('returns the original sender when calldata length is less than 20 bytes (address length)', async function () { // The forwarder doesn't produce calls with calldata length less than 20 bytes so `this.forwarderAsSigner` is used instead. await expect(this.context.connect(this.forwarderAsSigner).msgSender()) .to.emit(this.context, 'Sender') - .withArgs(this.forwarder.target); + .withArgs(this.forwarder); }); }); @@ -128,6 +128,6 @@ describe('ERC2771Context', function () { expect(await this.forwarder.verify(req)).to.equal(true); - await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender.address); + await expect(this.forwarder.execute(req)).to.emit(this.context, 'Sender').withArgs(this.sender); }); }); diff --git a/test/metatx/ERC2771Forwarder.test.js b/test/metatx/ERC2771Forwarder.test.js index 3bf264530..5bd0bf404 100644 --- a/test/metatx/ERC2771Forwarder.test.js +++ b/test/metatx/ERC2771Forwarder.test.js @@ -3,8 +3,8 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, ForwardRequest } = require('../helpers/eip712'); -const { bigint: time } = require('../helpers/time'); const { sum } = require('../helpers/math'); +const time = require('../helpers/time'); async function fixture() { const [sender, refundReceiver, another, ...accounts] = await ethers.getSigners(); @@ -140,7 +140,7 @@ describe('ERC2771Forwarder', function () { } else { await expect(promise) .to.be.revertedWithCustomError(this.forwarder, 'ERC2771UntrustfulTarget') - .withArgs(request.to, this.forwarder.target); + .withArgs(request.to, this.forwarder); } }); } @@ -299,7 +299,7 @@ describe('ERC2771Forwarder', function () { } else { await expect(promise) .to.be.revertedWithCustomError(this.forwarder, 'ERC2771UntrustfulTarget') - .withArgs(this.requests[idx].to, this.forwarder.target); + .withArgs(this.requests[idx].to, this.forwarder); } }); } diff --git a/test/proxy/ERC1967/ERC1967Utils.test.js b/test/proxy/ERC1967/ERC1967Utils.test.js index f733e297f..089032498 100644 --- a/test/proxy/ERC1967/ERC1967Utils.test.js +++ b/test/proxy/ERC1967/ERC1967Utils.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, setSlot, ImplementationSlot, AdminSlot, BeaconSlot } = require('../../helpers/erc1967'); +const { getAddressInSlot, setSlot, ImplementationSlot, AdminSlot, BeaconSlot } = require('../../helpers/storage'); async function fixture() { const [, admin, anotherAccount] = await ethers.getSigners(); @@ -26,8 +26,8 @@ describe('ERC1967Utils', function () { describe('getImplementation', function () { it('returns current implementation and matches implementation slot value', async function () { - expect(await this.utils.$getImplementation()).to.equal(this.v1.target); - expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(this.v1.target); + expect(await this.utils.$getImplementation()).to.equal(this.v1); + expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(this.v1); }); }); @@ -36,14 +36,14 @@ describe('ERC1967Utils', function () { const newImplementation = this.v2; const tx = await this.utils.$upgradeToAndCall(newImplementation, '0x'); - expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(newImplementation.target); - await expect(tx).to.emit(this.utils, 'Upgraded').withArgs(newImplementation.target); + expect(await getAddressInSlot(this.utils, ImplementationSlot)).to.equal(newImplementation); + await expect(tx).to.emit(this.utils, 'Upgraded').withArgs(newImplementation); }); it('reverts when implementation does not contain code', async function () { await expect(this.utils.$upgradeToAndCall(this.anotherAccount, '0x')) .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidImplementation') - .withArgs(this.anotherAccount.address); + .withArgs(this.anotherAccount); }); describe('when data is empty', function () { @@ -72,8 +72,8 @@ describe('ERC1967Utils', function () { describe('getAdmin', function () { it('returns current admin and matches admin slot value', async function () { - expect(await this.utils.$getAdmin()).to.equal(this.admin.address); - expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(this.admin.address); + expect(await this.utils.$getAdmin()).to.equal(this.admin); + expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(this.admin); }); }); @@ -82,8 +82,8 @@ describe('ERC1967Utils', function () { const newAdmin = this.anotherAccount; const tx = await this.utils.$changeAdmin(newAdmin); - expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(newAdmin.address); - await expect(tx).to.emit(this.utils, 'AdminChanged').withArgs(this.admin.address, newAdmin.address); + expect(await getAddressInSlot(this.utils, AdminSlot)).to.equal(newAdmin); + await expect(tx).to.emit(this.utils, 'AdminChanged').withArgs(this.admin, newAdmin); }); it('reverts when setting the address zero as admin', async function () { @@ -102,8 +102,8 @@ describe('ERC1967Utils', function () { describe('getBeacon', function () { it('returns current beacon and matches beacon slot value', async function () { - expect(await this.utils.$getBeacon()).to.equal(this.beacon.target); - expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(this.beacon.target); + expect(await this.utils.$getBeacon()).to.equal(this.beacon); + expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(this.beacon); }); }); @@ -112,14 +112,14 @@ describe('ERC1967Utils', function () { const newBeacon = await ethers.deployContract('UpgradeableBeaconMock', [this.v2]); const tx = await this.utils.$upgradeBeaconToAndCall(newBeacon, '0x'); - expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(newBeacon.target); - await expect(tx).to.emit(this.utils, 'BeaconUpgraded').withArgs(newBeacon.target); + expect(await getAddressInSlot(this.utils, BeaconSlot)).to.equal(newBeacon); + await expect(tx).to.emit(this.utils, 'BeaconUpgraded').withArgs(newBeacon); }); it('reverts when beacon does not contain code', async function () { await expect(this.utils.$upgradeBeaconToAndCall(this.anotherAccount, '0x')) .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidBeacon') - .withArgs(this.anotherAccount.address); + .withArgs(this.anotherAccount); }); it("reverts when beacon's implementation does not contain code", async function () { @@ -127,7 +127,7 @@ describe('ERC1967Utils', function () { await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x')) .to.be.revertedWithCustomError(this.utils, 'ERC1967InvalidImplementation') - .withArgs(this.anotherAccount.address); + .withArgs(this.anotherAccount); }); describe('when data is empty', function () { @@ -154,7 +154,7 @@ describe('ERC1967Utils', function () { const newBeacon = await ethers.deployContract('UpgradeableBeaconReentrantMock'); await expect(this.utils.$upgradeBeaconToAndCall(newBeacon, '0x')) .to.be.revertedWithCustomError(newBeacon, 'BeaconProxyBeaconSlotAddress') - .withArgs(newBeacon.target); + .withArgs(newBeacon); }); }); }); diff --git a/test/proxy/Proxy.behaviour.js b/test/proxy/Proxy.behaviour.js index 84cd93b51..e81d7a518 100644 --- a/test/proxy/Proxy.behaviour.js +++ b/test/proxy/Proxy.behaviour.js @@ -1,19 +1,19 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { getAddressInSlot, ImplementationSlot } = require('../helpers/erc1967'); +const { getAddressInSlot, ImplementationSlot } = require('../helpers/storage'); module.exports = function shouldBehaveLikeProxy() { it('cannot be initialized with a non-contract address', async function () { const initializeData = '0x'; await expect(this.createProxy(this.nonContractAddress, initializeData)) .to.be.revertedWithCustomError(await ethers.getContractFactory('ERC1967Proxy'), 'ERC1967InvalidImplementation') - .withArgs(this.nonContractAddress.address); + .withArgs(this.nonContractAddress); }); const assertProxyInitialization = function ({ value, balance }) { it('sets the implementation address', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementation.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementation); }); it('initializes the proxy', async function () { diff --git a/test/proxy/beacon/BeaconProxy.test.js b/test/proxy/beacon/BeaconProxy.test.js index 66856ac08..68387d1f6 100644 --- a/test/proxy/beacon/BeaconProxy.test.js +++ b/test/proxy/beacon/BeaconProxy.test.js @@ -1,7 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, BeaconSlot } = require('../../helpers/erc1967'); + +const { getAddressInSlot, BeaconSlot } = require('../../helpers/storage'); async function fixture() { const [admin, other] = await ethers.getSigners(); @@ -27,7 +28,7 @@ describe('BeaconProxy', function () { await expect(this.newBeaconProxy(notBeacon, '0x')) .to.be.revertedWithCustomError(this.factory, 'ERC1967InvalidBeacon') - .withArgs(notBeacon.address); + .withArgs(notBeacon); }); it('non-compliant beacon', async function () { @@ -48,7 +49,7 @@ describe('BeaconProxy', function () { describe('initialization', function () { async function assertInitialized({ value, balance }) { const beaconAddress = await getAddressInSlot(this.proxy, BeaconSlot); - expect(beaconAddress).to.equal(this.beacon.target); + expect(beaconAddress).to.equal(this.beacon); const dummy = this.v1.attach(this.proxy); expect(await dummy.value()).to.equal(value); diff --git a/test/proxy/beacon/UpgradeableBeacon.test.js b/test/proxy/beacon/UpgradeableBeacon.test.js index be6aca754..1a7224f00 100644 --- a/test/proxy/beacon/UpgradeableBeacon.test.js +++ b/test/proxy/beacon/UpgradeableBeacon.test.js @@ -20,36 +20,36 @@ describe('UpgradeableBeacon', function () { it('cannot be created with non-contract implementation', async function () { await expect(ethers.deployContract('UpgradeableBeacon', [this.other, this.admin])) .to.be.revertedWithCustomError(this.beacon, 'BeaconInvalidImplementation') - .withArgs(this.other.address); + .withArgs(this.other); }); describe('once deployed', async function () { it('emits Upgraded event to the first implementation', async function () { - await expect(this.beacon.deploymentTransaction()).to.emit(this.beacon, 'Upgraded').withArgs(this.v1.target); + await expect(this.beacon.deploymentTransaction()).to.emit(this.beacon, 'Upgraded').withArgs(this.v1); }); it('returns implementation', async function () { - expect(await this.beacon.implementation()).to.equal(this.v1.target); + expect(await this.beacon.implementation()).to.equal(this.v1); }); it('can be upgraded by the admin', async function () { await expect(this.beacon.connect(this.admin).upgradeTo(this.v2)) .to.emit(this.beacon, 'Upgraded') - .withArgs(this.v2.target); + .withArgs(this.v2); - expect(await this.beacon.implementation()).to.equal(this.v2.target); + expect(await this.beacon.implementation()).to.equal(this.v2); }); it('cannot be upgraded to a non-contract', async function () { await expect(this.beacon.connect(this.admin).upgradeTo(this.other)) .to.be.revertedWithCustomError(this.beacon, 'BeaconInvalidImplementation') - .withArgs(this.other.address); + .withArgs(this.other); }); it('cannot be upgraded by other account', async function () { await expect(this.beacon.connect(this.other).upgradeTo(this.v2)) .to.be.revertedWithCustomError(this.beacon, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); }); }); diff --git a/test/proxy/transparent/ProxyAdmin.test.js b/test/proxy/transparent/ProxyAdmin.test.js index 9f137536a..d70075d04 100644 --- a/test/proxy/transparent/ProxyAdmin.test.js +++ b/test/proxy/transparent/ProxyAdmin.test.js @@ -1,7 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); + +const { getAddressInSlot, ImplementationSlot } = require('../../helpers/storage'); async function fixture() { const [admin, other] = await ethers.getSigners(); @@ -27,7 +28,7 @@ describe('ProxyAdmin', function () { }); it('has an owner', async function () { - expect(await this.proxyAdmin.owner()).to.equal(this.admin.address); + expect(await this.proxyAdmin.owner()).to.equal(this.admin); }); it('has an interface version', async function () { @@ -39,14 +40,14 @@ describe('ProxyAdmin', function () { it('fails to upgrade', async function () { await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, '0x')) .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); }); context('with authorized account', function () { it('upgrades implementation', async function () { await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, '0x'); - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2); }); }); }); @@ -57,7 +58,7 @@ describe('ProxyAdmin', function () { const data = this.v1.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); await expect(this.proxyAdmin.connect(this.other).upgradeAndCall(this.proxy, this.v2, data)) .to.be.revertedWithCustomError(this.proxyAdmin, 'OwnableUnauthorizedAccount') - .withArgs(this.other.address); + .withArgs(this.other); }); }); @@ -73,7 +74,7 @@ describe('ProxyAdmin', function () { it('upgrades implementation', async function () { const data = this.v2.interface.encodeFunctionData('initializeNonPayableWithValue', [1337n]); await this.proxyAdmin.connect(this.admin).upgradeAndCall(this.proxy, this.v2, data); - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.be.equal(this.v2); }); }); }); diff --git a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js index 021228199..d90bd56e2 100644 --- a/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +++ b/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js @@ -1,8 +1,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); -const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpers/erc1967'); const { impersonate } = require('../../helpers/account'); +const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpers/storage'); // createProxy, initialOwner, accounts module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { @@ -43,7 +43,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { describe('implementation', function () { it('returns the current implementation address', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementationV0.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.implementationV0); }); it('delegates to the implementation', async function () { @@ -53,26 +53,26 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { describe('proxy admin', function () { it('emits AdminChanged event during construction', async function () { - await expect(this.tx).to.emit(this.proxy, 'AdminChanged').withArgs(ethers.ZeroAddress, this.proxyAdmin.target); + await expect(this.tx).to.emit(this.proxy, 'AdminChanged').withArgs(ethers.ZeroAddress, this.proxyAdmin); }); it('sets the proxy admin in storage with the correct initial owner', async function () { - expect(await getAddressInSlot(this.proxy, AdminSlot)).to.equal(this.proxyAdmin.target); + expect(await getAddressInSlot(this.proxy, AdminSlot)).to.equal(this.proxyAdmin); - expect(await this.proxyAdmin.owner()).to.equal(this.owner.address); + expect(await this.proxyAdmin.owner()).to.equal(this.owner); }); it('can overwrite the admin by the implementation', async function () { await this.instance.unsafeOverrideAdmin(this.other); const ERC1967AdminSlotValue = await getAddressInSlot(this.proxy, AdminSlot); - expect(ERC1967AdminSlotValue).to.equal(this.other.address); - expect(ERC1967AdminSlotValue).to.not.equal(this.proxyAdmin.address); + expect(ERC1967AdminSlotValue).to.equal(this.other); + expect(ERC1967AdminSlotValue).to.not.equal(this.proxyAdmin); // Still allows previous admin to execute admin operations await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.implementationV1, '0x')) .to.emit(this.proxy, 'Upgraded') - .withArgs(this.implementationV1.target); + .withArgs(this.implementationV1); }); }); @@ -99,11 +99,11 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested implementation', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behavior.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behavior); }); it('emits an event', async function () { - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behavior.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behavior); }); it('calls the initializer function', async function () { @@ -160,9 +160,9 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested version and emits an event', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV1.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV1); - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV1.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV1); }); it("calls the 'initialize' function and sends given value to the proxy", async function () { @@ -184,9 +184,9 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested version and emits an event', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV2.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV2); - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV2.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV2); }); it("calls the 'migrate' function and sends given value to the proxy", async function () { @@ -209,9 +209,9 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { }); it('upgrades to the requested version and emits an event', async function () { - expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV3.target); + expect(await getAddressInSlot(this.proxy, ImplementationSlot)).to.equal(this.behaviorV3); - await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV3.target); + await expect(this.tx).to.emit(this.proxy, 'Upgraded').withArgs(this.behaviorV3); }); it("calls the 'migrate' function and sends given value to the proxy", async function () { @@ -255,7 +255,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy() { it('executes the proxy function if the sender is the admin', async function () { await expect(this.proxy.connect(this.proxyAdminAsSigner).upgradeToAndCall(this.clashingImplV1, '0x')) .to.emit(this.proxy, 'Upgraded') - .withArgs(this.clashingImplV1.target); + .withArgs(this.clashingImplV1); }); it('delegates the call to implementation when sender is not the admin', async function () { diff --git a/test/proxy/utils/UUPSUpgradeable.test.js b/test/proxy/utils/UUPSUpgradeable.test.js index 876a64cf9..17f865761 100644 --- a/test/proxy/utils/UUPSUpgradeable.test.js +++ b/test/proxy/utils/UUPSUpgradeable.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { getAddressInSlot, ImplementationSlot } = require('../../helpers/erc1967'); +const { getAddressInSlot, ImplementationSlot } = require('../../helpers/storage'); async function fixture() { const implInitial = await ethers.deployContract('UUPSUpgradeableMock'); @@ -40,9 +40,9 @@ describe('UUPSUpgradeable', function () { it('upgrade to upgradeable implementation', async function () { await expect(this.instance.upgradeToAndCall(this.implUpgradeOk, '0x')) .to.emit(this.instance, 'Upgraded') - .withArgs(this.implUpgradeOk.target); + .withArgs(this.implUpgradeOk); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk.target); + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk); }); it('upgrade to upgradeable implementation with call', async function () { @@ -52,9 +52,9 @@ describe('UUPSUpgradeable', function () { this.instance.upgradeToAndCall(this.implUpgradeOk, this.implUpgradeOk.interface.encodeFunctionData('increment')), ) .to.emit(this.instance, 'Upgraded') - .withArgs(this.implUpgradeOk.target); + .withArgs(this.implUpgradeOk); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk.target); + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeOk); expect(await this.instance.current()).to.equal(1n); }); @@ -96,16 +96,16 @@ describe('UUPSUpgradeable', function () { it('upgrade to and unsafe upgradeable implementation', async function () { await expect(this.instance.upgradeToAndCall(this.implUpgradeUnsafe, '0x')) .to.emit(this.instance, 'Upgraded') - .withArgs(this.implUpgradeUnsafe.target); + .withArgs(this.implUpgradeUnsafe); - expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeUnsafe.target); + expect(await getAddressInSlot(this.instance, ImplementationSlot)).to.equal(this.implUpgradeUnsafe); }); // delegate to a non existing upgradeTo function causes a low level revert it('reject upgrade to non uups implementation', async function () { await expect(this.instance.upgradeToAndCall(this.implUpgradeNonUUPS, '0x')) .to.be.revertedWithCustomError(this.instance, 'ERC1967InvalidImplementation') - .withArgs(this.implUpgradeNonUUPS.target); + .withArgs(this.implUpgradeNonUUPS); }); it('reject proxy address as implementation', async function () { @@ -115,6 +115,6 @@ describe('UUPSUpgradeable', function () { await expect(this.instance.upgradeToAndCall(otherInstance, '0x')) .to.be.revertedWithCustomError(this.instance, 'ERC1967InvalidImplementation') - .withArgs(otherInstance.target); + .withArgs(otherInstance); }); }); diff --git a/test/sanity.test.js b/test/sanity.test.js index 9728b14e4..1fe2fa9c9 100644 --- a/test/sanity.test.js +++ b/test/sanity.test.js @@ -8,16 +8,12 @@ async function fixture() { return { signers, addresses }; } -contract('Environment sanity', function (accounts) { +describe('Environment sanity', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); describe('[skip-on-coverage] signers', function () { - it('match accounts', async function () { - expect(this.addresses).to.deep.equal(accounts); - }); - it('signer #0 is skipped', async function () { const signer = await ethers.provider.getSigner(0); expect(this.addresses).to.not.include(await signer.getAddress()); diff --git a/test/token/ERC1155/ERC1155.behavior.js b/test/token/ERC1155/ERC1155.behavior.js index 9ae706f84..cdf62b50d 100644 --- a/test/token/ERC1155/ERC1155.behavior.js +++ b/test/token/ERC1155/ERC1155.behavior.js @@ -2,9 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); -const { - bigint: { RevertType }, -} = require('../../helpers/enums'); +const { RevertType } = require('../../helpers/enums'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); function shouldBehaveLikeERC1155() { @@ -118,9 +116,7 @@ function shouldBehaveLikeERC1155() { }); it('emits an ApprovalForAll log', async function () { - await expect(this.tx) - .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.holder.address, this.proxy.address, true); + await expect(this.tx).to.emit(this.token, 'ApprovalForAll').withArgs(this.holder, this.proxy, true); }); it('can unset approval for an operator', async function () { @@ -148,7 +144,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, this.recipient, firstTokenId, firstTokenValue + 1n, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, firstTokenValue, firstTokenValue + 1n, firstTokenId); + .withArgs(this.holder, firstTokenValue, firstTokenValue + 1n, firstTokenId); }); it('reverts when transferring to zero address', async function () { @@ -173,13 +169,7 @@ function shouldBehaveLikeERC1155() { it('emits a TransferSingle log', async function () { await expect(this.tx) .to.emit(this.token, 'TransferSingle') - .withArgs( - this.args.operator.address ?? this.args.operator.target ?? this.args.operator, - this.args.from.address ?? this.args.from.target ?? this.args.from, - this.args.to.address ?? this.args.to.target ?? this.args.to, - this.args.id, - this.args.value, - ); + .withArgs(this.args.operator, this.args.from, this.args.to, this.args.id, this.args.value); }); } @@ -219,7 +209,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, this.recipient, firstTokenId, firstTokenValue, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.proxy.address, this.holder.address); + .withArgs(this.proxy, this.holder); }); }); @@ -278,14 +268,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155Received', async function () { await expect(this.tx) .to.emit(this.receiver, 'Received') - .withArgs( - this.args.operator.address, - this.args.from.address, - this.args.id, - this.args.value, - this.args.data, - anyValue, - ); + .withArgs(this.args.operator, this.args.from, this.args.id, this.args.value, this.args.data, anyValue); }); }); @@ -309,14 +292,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155Received', async function () { await expect(this.tx) .to.emit(this.receiver, 'Received') - .withArgs( - this.args.operator.address, - this.args.from.address, - this.args.id, - this.args.value, - this.args.data, - anyValue, - ); + .withArgs(this.args.operator, this.args.from, this.args.id, this.args.value, this.args.data, anyValue); }); }); }); @@ -335,7 +311,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -370,7 +346,7 @@ function shouldBehaveLikeERC1155() { .safeTransferFrom(this.holder, receiver, firstTokenId, firstTokenValue, '0x'), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -411,7 +387,7 @@ function shouldBehaveLikeERC1155() { describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const invalidReceiver = this.token.target; + const invalidReceiver = this.token; await expect( this.token @@ -443,7 +419,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, secondTokenValue, secondTokenValue + 1n, secondTokenId); + .withArgs(this.holder, secondTokenValue, secondTokenValue + 1n, secondTokenId); }); it("reverts when ids array length doesn't match values array length", async function () { @@ -510,13 +486,7 @@ function shouldBehaveLikeERC1155() { it('emits a TransferBatch log', async function () { await expect(this.tx) .to.emit(this.token, 'TransferBatch') - .withArgs( - this.args.operator.address ?? this.args.operator.target ?? this.args.operator, - this.args.from.address ?? this.args.from.target ?? this.args.from, - this.args.to.address ?? this.args.to.target ?? this.args.to, - this.args.ids, - this.args.values, - ); + .withArgs(this.args.operator, this.args.from, this.args.to, this.args.ids, this.args.values); }); } @@ -557,7 +527,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.proxy.address, this.holder.address); + .withArgs(this.proxy, this.holder); }); }); @@ -616,14 +586,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155BatchReceived', async function () { await expect(this.tx) .to.emit(this.receiver, 'BatchReceived') - .withArgs( - this.holder.address, - this.holder.address, - this.args.ids, - this.args.values, - this.args.data, - anyValue, - ); + .withArgs(this.holder, this.holder, this.args.ids, this.args.values, this.args.data, anyValue); }); }); @@ -647,14 +610,7 @@ function shouldBehaveLikeERC1155() { it('calls onERC1155Received', async function () { await expect(this.tx) .to.emit(this.receiver, 'BatchReceived') - .withArgs( - this.holder.address, - this.holder.address, - this.args.ids, - this.args.values, - this.args.data, - anyValue, - ); + .withArgs(this.holder, this.holder, this.args.ids, this.args.values, this.args.data, anyValue); }); }); }); @@ -679,7 +635,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -726,7 +682,7 @@ function shouldBehaveLikeERC1155() { ), ) .to.be.revertedWithCustomError(this.token, 'ERC1155InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); }); @@ -779,7 +735,7 @@ function shouldBehaveLikeERC1155() { describe('to a contract that does not implement the required function', function () { it('reverts', async function () { - const invalidReceiver = this.token.target; + const invalidReceiver = this.token; await expect( this.token diff --git a/test/token/ERC1155/ERC1155.test.js b/test/token/ERC1155/ERC1155.test.js index 486d1aec9..8b0a672b2 100644 --- a/test/token/ERC1155/ERC1155.test.js +++ b/test/token/ERC1155/ERC1155.test.js @@ -46,7 +46,7 @@ describe('ERC1155', function () { it('emits a TransferSingle event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferSingle') - .withArgs(this.operator.address, ethers.ZeroAddress, this.holder.address, tokenId, mintValue); + .withArgs(this.operator, ethers.ZeroAddress, this.holder, tokenId, mintValue); }); it('credits the minted token value', async function () { @@ -80,7 +80,7 @@ describe('ERC1155', function () { it('emits a TransferBatch event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferBatch') - .withArgs(this.operator.address, ethers.ZeroAddress, this.holder.address, tokenBatchIds, mintValues); + .withArgs(this.operator, ethers.ZeroAddress, this.holder, tokenBatchIds, mintValues); }); it('credits the minted batch of tokens', async function () { @@ -104,7 +104,7 @@ describe('ERC1155', function () { it('reverts when burning a non-existent token id', async function () { await expect(this.token.$_burn(this.holder, tokenId, mintValue)) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, 0, mintValue, tokenId); + .withArgs(this.holder, 0, mintValue, tokenId); }); it('reverts when burning more than available tokens', async function () { @@ -112,7 +112,7 @@ describe('ERC1155', function () { await expect(this.token.$_burn(this.holder, tokenId, mintValue + 1n)) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, mintValue, mintValue + 1n, tokenId); + .withArgs(this.holder, mintValue, mintValue + 1n, tokenId); }); describe('with minted-then-burnt tokens', function () { @@ -124,7 +124,7 @@ describe('ERC1155', function () { it('emits a TransferSingle event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferSingle') - .withArgs(this.operator.address, this.holder.address, ethers.ZeroAddress, tokenId, burnValue); + .withArgs(this.operator, this.holder, ethers.ZeroAddress, tokenId, burnValue); }); it('accounts for both minting and burning', async function () { @@ -153,7 +153,7 @@ describe('ERC1155', function () { it('reverts when burning a non-existent token id', async function () { await expect(this.token.$_burnBatch(this.holder, tokenBatchIds, burnValues)) .to.be.revertedWithCustomError(this.token, 'ERC1155InsufficientBalance') - .withArgs(this.holder.address, 0, burnValues[0], tokenBatchIds[0]); + .withArgs(this.holder, 0, burnValues[0], tokenBatchIds[0]); }); describe('with minted-then-burnt tokens', function () { @@ -165,7 +165,7 @@ describe('ERC1155', function () { it('emits a TransferBatch event', async function () { await expect(this.tx) .to.emit(this.token, 'TransferBatch') - .withArgs(this.operator.address, this.holder.address, ethers.ZeroAddress, tokenBatchIds, burnValues); + .withArgs(this.operator, this.holder, ethers.ZeroAddress, tokenBatchIds, burnValues); }); it('accounts for both minting and burning', async function () { diff --git a/test/token/ERC1155/extensions/ERC1155Burnable.test.js b/test/token/ERC1155/extensions/ERC1155Burnable.test.js index 6a75dc223..01e7ee2ed 100644 --- a/test/token/ERC1155/extensions/ERC1155Burnable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Burnable.test.js @@ -37,7 +37,7 @@ describe('ERC1155Burnable', function () { it("unapproved accounts cannot burn the holder's tokens", async function () { await expect(this.token.connect(this.other).burn(this.holder, ids[0], values[0] - 1n)) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.other.address, this.holder.address); + .withArgs(this.other, this.holder); }); }); @@ -60,7 +60,7 @@ describe('ERC1155Burnable', function () { it("unapproved accounts cannot burn the holder's tokens", async function () { await expect(this.token.connect(this.other).burnBatch(this.holder, ids, [values[0] - 1n, values[1] - 2n])) .to.be.revertedWithCustomError(this.token, 'ERC1155MissingApprovalForAll') - .withArgs(this.other.address, this.holder.address); + .withArgs(this.other, this.holder); }); }); }); diff --git a/test/token/ERC1155/extensions/ERC1155Pausable.test.js b/test/token/ERC1155/extensions/ERC1155Pausable.test.js index 7038180bb..21a2e0bca 100644 --- a/test/token/ERC1155/extensions/ERC1155Pausable.test.js +++ b/test/token/ERC1155/extensions/ERC1155Pausable.test.js @@ -8,7 +8,7 @@ async function fixture() { return { token, holder, operator, receiver, other }; } -contract('ERC1155Pausable', function () { +describe('ERC1155Pausable', function () { const firstTokenId = 37n; const firstTokenValue = 42n; const secondTokenId = 19842n; diff --git a/test/token/ERC20/ERC20.behavior.js b/test/token/ERC20/ERC20.behavior.js index 522df3fcf..2e77f32a1 100644 --- a/test/token/ERC20/ERC20.behavior.js +++ b/test/token/ERC20/ERC20.behavior.js @@ -58,7 +58,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { it('emits a transfer event', async function () { await expect(this.tx) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.anotherAccount.address, value); + .withArgs(this.initialHolder, this.anotherAccount, value); }); if (forcedApproval) { @@ -85,7 +85,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), ) .to.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, value - 1n, value); + .withArgs(this.initialHolder, value - 1n, value); }); }); @@ -102,7 +102,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), ) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') - .withArgs(this.recipient.address, allowance, value); + .withArgs(this.recipient, allowance, value); }); it('reverts when the token owner does not have enough balance', async function () { @@ -112,7 +112,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) { this.token.connect(this.recipient).transferFrom(this.initialHolder, this.anotherAccount, value), ) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, value - 1n, value); + .withArgs(this.initialHolder, value - 1n, value); }); }); @@ -166,7 +166,7 @@ function shouldBehaveLikeERC20Transfer(balance) { const value = balance + 1n; await expect(this.transfer(this.initialHolder, this.recipient, value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, balance, value); + .withArgs(this.initialHolder, balance, value); }); describe('when the sender transfers all balance', function () { @@ -181,9 +181,7 @@ function shouldBehaveLikeERC20Transfer(balance) { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.recipient.address, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, this.recipient, value); }); }); @@ -199,9 +197,7 @@ function shouldBehaveLikeERC20Transfer(balance) { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.recipient.address, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, this.recipient, value); }); }); }); @@ -221,7 +217,7 @@ function shouldBehaveLikeERC20Approve(supply) { it('emits an approval event', async function () { await expect(this.approve(this.initialHolder, this.recipient, value)) .to.emit(this.token, 'Approval') - .withArgs(this.initialHolder.address, this.recipient.address, value); + .withArgs(this.initialHolder, this.recipient, value); }); it('approves the requested value when there was no approved value before', async function () { @@ -244,7 +240,7 @@ function shouldBehaveLikeERC20Approve(supply) { it('emits an approval event', async function () { await expect(this.approve(this.initialHolder, this.recipient, value)) .to.emit(this.token, 'Approval') - .withArgs(this.initialHolder.address, this.recipient.address, value); + .withArgs(this.initialHolder, this.recipient, value); }); it('approves the requested value when there was no approved value before', async function () { diff --git a/test/token/ERC20/ERC20.test.js b/test/token/ERC20/ERC20.test.js index 97037a697..7d584ce7b 100644 --- a/test/token/ERC20/ERC20.test.js +++ b/test/token/ERC20/ERC20.test.js @@ -73,9 +73,7 @@ describe('ERC20', function () { }); it('emits Transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient, value); }); }); }); @@ -91,7 +89,7 @@ describe('ERC20', function () { it('rejects burning more than balance', async function () { await expect(this.token.$_burn(this.initialHolder, initialSupply + 1n)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, initialSupply, initialSupply + 1n); + .withArgs(this.initialHolder, initialSupply, initialSupply + 1n); }); const describeBurn = function (description, value) { @@ -111,7 +109,7 @@ describe('ERC20', function () { it('emits Transfer event', async function () { await expect(this.tx) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + .withArgs(this.initialHolder, ethers.ZeroAddress, value); }); }); }; @@ -130,9 +128,7 @@ describe('ERC20', function () { it('from is the zero address', async function () { const tx = await this.token.$_update(ethers.ZeroAddress, this.initialHolder, value); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.initialHolder.address, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.initialHolder, value); expect(await this.token.totalSupply()).to.equal(this.totalSupply + value); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, value); @@ -140,9 +136,7 @@ describe('ERC20', function () { it('to is the zero address', async function () { const tx = await this.token.$_update(this.initialHolder, ethers.ZeroAddress, value); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, ethers.ZeroAddress, value); expect(await this.token.totalSupply()).to.equal(this.totalSupply - value); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); @@ -161,15 +155,13 @@ describe('ERC20', function () { it('reverts without balance', async function () { await expect(this.token.$_update(this.recipient, this.recipient, value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.recipient.address, 0n, value); + .withArgs(this.recipient, 0n, value); }); it('executes with balance', async function () { const tx = await this.token.$_update(this.initialHolder, this.initialHolder, value); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, 0n); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, this.initialHolder.address, value); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(this.initialHolder, this.initialHolder, value); }); }); }); diff --git a/test/token/ERC20/extensions/ERC20Burnable.test.js b/test/token/ERC20/extensions/ERC20Burnable.test.js index 9fa02e44f..dc40c7917 100644 --- a/test/token/ERC20/extensions/ERC20Burnable.test.js +++ b/test/token/ERC20/extensions/ERC20Burnable.test.js @@ -26,7 +26,7 @@ describe('ERC20Burnable', function () { await expect(this.token.connect(this.owner).burn(value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.owner.address, this.initialBalance, value); + .withArgs(this.owner, this.initialBalance, value); }); describe('on success', function () { @@ -44,9 +44,7 @@ describe('ERC20Burnable', function () { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.owner, ethers.ZeroAddress, value); }); }); } @@ -62,7 +60,7 @@ describe('ERC20Burnable', function () { await expect(this.token.connect(this.burner).burnFrom(this.owner, value)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.owner.address, this.initialBalance, value); + .withArgs(this.owner, this.initialBalance, value); }); it('if not enough allowance', async function () { @@ -72,7 +70,7 @@ describe('ERC20Burnable', function () { await expect(this.token.connect(this.burner).burnFrom(this.owner, allowance + 1n)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') - .withArgs(this.burner.address, allowance, allowance + 1n); + .withArgs(this.burner, allowance, allowance + 1n); }); }); @@ -98,9 +96,7 @@ describe('ERC20Burnable', function () { }); it('emits a transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, value); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.owner, ethers.ZeroAddress, value); }); }); } diff --git a/test/token/ERC20/extensions/ERC20FlashMint.test.js b/test/token/ERC20/extensions/ERC20FlashMint.test.js index cee00db0f..745cd11a9 100644 --- a/test/token/ERC20/extensions/ERC20FlashMint.test.js +++ b/test/token/ERC20/extensions/ERC20FlashMint.test.js @@ -56,13 +56,13 @@ describe('ERC20FlashMint', function () { const tx = await this.token.flashLoan(receiver, this.token, loanValue, '0x'); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, receiver.target, loanValue) + .withArgs(ethers.ZeroAddress, receiver, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(receiver.target, ethers.ZeroAddress, loanValue) + .withArgs(receiver, ethers.ZeroAddress, loanValue) .to.emit(receiver, 'BalanceOf') - .withArgs(this.token.target, receiver.target, loanValue) + .withArgs(this.token, receiver, loanValue) .to.emit(receiver, 'TotalSupply') - .withArgs(this.token.target, initialSupply + loanValue); + .withArgs(this.token, initialSupply + loanValue); await expect(tx).to.changeTokenBalance(this.token, receiver, 0); expect(await this.token.totalSupply()).to.equal(initialSupply); @@ -73,14 +73,14 @@ describe('ERC20FlashMint', function () { const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [false, true]); await expect(this.token.flashLoan(receiver, this.token, loanValue, '0x')) .to.be.revertedWithCustomError(this.token, 'ERC3156InvalidReceiver') - .withArgs(receiver.target); + .withArgs(receiver); }); it('missing approval', async function () { const receiver = await ethers.deployContract('ERC3156FlashBorrowerMock', [true, false]); await expect(this.token.flashLoan(receiver, this.token, loanValue, '0x')) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientAllowance') - .withArgs(this.token.target, 0, loanValue); + .withArgs(this.token, 0, loanValue); }); it('unavailable funds', async function () { @@ -88,7 +88,7 @@ describe('ERC20FlashMint', function () { const data = this.token.interface.encodeFunctionData('transfer', [this.other.address, 10]); await expect(this.token.flashLoan(receiver, this.token, loanValue, data)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(receiver.target, loanValue - 10n, loanValue); + .withArgs(receiver, loanValue - 10n, loanValue); }); it('more than maxFlashLoan', async function () { @@ -109,7 +109,7 @@ describe('ERC20FlashMint', function () { const tx = await this.token.$_mint(this.receiver, receiverInitialBalance); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.receiver.target, receiverInitialBalance); + .withArgs(ethers.ZeroAddress, this.receiver, receiverInitialBalance); await expect(tx).to.changeTokenBalance(this.token, this.receiver, receiverInitialBalance); await this.token.setFlashFee(flashFee); @@ -120,13 +120,13 @@ describe('ERC20FlashMint', function () { const tx = await this.token.flashLoan(this.receiver, this.token, loanValue, '0x'); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.receiver.target, loanValue) + .withArgs(ethers.ZeroAddress, this.receiver, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(this.receiver.target, ethers.ZeroAddress, loanValue + flashFee) + .withArgs(this.receiver, ethers.ZeroAddress, loanValue + flashFee) .to.emit(this.receiver, 'BalanceOf') - .withArgs(this.token.target, this.receiver.target, receiverInitialBalance + loanValue) + .withArgs(this.token, this.receiver, receiverInitialBalance + loanValue) .to.emit(this.receiver, 'TotalSupply') - .withArgs(this.token.target, initialSupply + receiverInitialBalance + loanValue); + .withArgs(this.token, initialSupply + receiverInitialBalance + loanValue); await expect(tx).to.changeTokenBalances(this.token, [this.receiver, ethers.ZeroAddress], [-flashFee, 0]); expect(await this.token.totalSupply()).to.equal(initialSupply + receiverInitialBalance - flashFee); @@ -136,20 +136,20 @@ describe('ERC20FlashMint', function () { it('custom flash fee receiver', async function () { const flashFeeReceiverAddress = this.anotherAccount; await this.token.setFlashFeeReceiver(flashFeeReceiverAddress); - expect(await this.token.$_flashFeeReceiver()).to.equal(flashFeeReceiverAddress.address); + expect(await this.token.$_flashFeeReceiver()).to.equal(flashFeeReceiverAddress); const tx = await this.token.flashLoan(this.receiver, this.token, loanValue, '0x'); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.receiver.target, loanValue) + .withArgs(ethers.ZeroAddress, this.receiver, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(this.receiver.target, ethers.ZeroAddress, loanValue) + .withArgs(this.receiver, ethers.ZeroAddress, loanValue) .to.emit(this.token, 'Transfer') - .withArgs(this.receiver.target, flashFeeReceiverAddress.address, flashFee) + .withArgs(this.receiver, flashFeeReceiverAddress, flashFee) .to.emit(this.receiver, 'BalanceOf') - .withArgs(this.token.target, this.receiver.target, receiverInitialBalance + loanValue) + .withArgs(this.token, this.receiver, receiverInitialBalance + loanValue) .to.emit(this.receiver, 'TotalSupply') - .withArgs(this.token.target, initialSupply + receiverInitialBalance + loanValue); + .withArgs(this.token, initialSupply + receiverInitialBalance + loanValue); await expect(tx).to.changeTokenBalances( this.token, [this.receiver, flashFeeReceiverAddress], diff --git a/test/token/ERC20/extensions/ERC20Permit.test.js b/test/token/ERC20/extensions/ERC20Permit.test.js index 538fa7d7f..8336af2d9 100644 --- a/test/token/ERC20/extensions/ERC20Permit.test.js +++ b/test/token/ERC20/extensions/ERC20Permit.test.js @@ -3,7 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, domainSeparator, Permit } = require('../../../helpers/eip712'); -const { bigint: time } = require('../../../helpers/time'); +const time = require('../../../helpers/time'); const name = 'My Token'; const symbol = 'MTKN'; @@ -81,7 +81,7 @@ describe('ERC20Permit', function () { await expect(this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s)) .to.be.revertedWithCustomError(this.token, 'ERC2612InvalidSigner') - .withArgs(recovered, this.owner.address); + .withArgs(recovered, this.owner); }); it('rejects other signature', async function () { @@ -91,7 +91,7 @@ describe('ERC20Permit', function () { await expect(this.token.permit(this.owner, this.spender, value, maxDeadline, v, r, s)) .to.be.revertedWithCustomError(this.token, 'ERC2612InvalidSigner') - .withArgs(this.other.address, this.owner.address); + .withArgs(this.other, this.owner); }); it('rejects expired permit', async function () { diff --git a/test/token/ERC20/extensions/ERC20Votes.test.js b/test/token/ERC20/extensions/ERC20Votes.test.js index 165d08a18..3c595c919 100644 --- a/test/token/ERC20/extensions/ERC20Votes.test.js +++ b/test/token/ERC20/extensions/ERC20Votes.test.js @@ -4,7 +4,7 @@ const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers' const { getDomain, Delegation } = require('../../../helpers/eip712'); const { batchInBlock } = require('../../../helpers/txpool'); -const { bigint: time } = require('../../../helpers/time'); +const time = require('../../../helpers/time'); const { shouldBehaveLikeVotes } = require('../../../governance/utils/Votes.behavior'); @@ -75,11 +75,11 @@ describe('ERC20Votes', function () { await expect(tx) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .withArgs(this.holder, ethers.ZeroAddress, this.holder) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 0n, supply); + .withArgs(this.holder, 0n, supply); - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); expect(await this.token.getVotes(this.holder)).to.equal(supply); expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(0n); await mine(); @@ -91,10 +91,10 @@ describe('ERC20Votes', function () { await expect(this.token.connect(this.holder).delegate(this.holder)) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .withArgs(this.holder, ethers.ZeroAddress, this.holder) .to.not.emit(this.token, 'DelegateVotesChanged'); - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); }); }); @@ -125,11 +125,11 @@ describe('ERC20Votes', function () { await expect(tx) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, ethers.ZeroAddress, this.holder.address) + .withArgs(this.holder, ethers.ZeroAddress, this.holder) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 0n, supply); + .withArgs(this.holder, 0n, supply); - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); expect(await this.token.getVotes(this.holder)).to.equal(supply); expect(await this.token.getPastVotes(this.holder, timepoint - 1n)).to.equal(0n); @@ -154,7 +154,7 @@ describe('ERC20Votes', function () { await expect(this.token.delegateBySig(this.holder, nonce, ethers.MaxUint256, v, r, s)) .to.be.revertedWithCustomError(this.token, 'InvalidAccountNonce') - .withArgs(this.holder.address, nonce + 1n); + .withArgs(this.holder, nonce + 1n); }); it('rejects bad delegatee', async function () { @@ -175,9 +175,9 @@ describe('ERC20Votes', function () { const { args } = await tx .wait() .then(receipt => receipt.logs.find(event => event.fragment.name == 'DelegateChanged')); - expect(args[0]).to.not.equal(this.holder.address); + expect(args[0]).to.not.equal(this.holder); expect(args[1]).to.equal(ethers.ZeroAddress); - expect(args[2]).to.equal(this.delegatee.address); + expect(args[2]).to.equal(this.delegatee); }); it('rejects bad nonce', async function () { @@ -238,20 +238,20 @@ describe('ERC20Votes', function () { }); it('call', async function () { - expect(await this.token.delegates(this.holder)).to.equal(this.holder.address); + expect(await this.token.delegates(this.holder)).to.equal(this.holder); const tx = await this.token.connect(this.holder).delegate(this.delegatee); const timepoint = await time.clockFromReceipt[mode](tx); await expect(tx) .to.emit(this.token, 'DelegateChanged') - .withArgs(this.holder.address, this.holder.address, this.delegatee.address) + .withArgs(this.holder, this.holder, this.delegatee) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, supply, 0n) + .withArgs(this.holder, supply, 0n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.delegatee.address, 0n, supply); + .withArgs(this.delegatee, 0n, supply); - expect(await this.token.delegates(this.holder)).to.equal(this.delegatee.address); + expect(await this.token.delegates(this.holder)).to.equal(this.delegatee); expect(await this.token.getVotes(this.holder)).to.equal(0n); expect(await this.token.getVotes(this.delegatee)).to.equal(supply); @@ -271,7 +271,7 @@ describe('ERC20Votes', function () { it('no delegation', async function () { await expect(this.token.connect(this.holder).transfer(this.recipient, 1n)) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.not.emit(this.token, 'DelegateVotesChanged'); this.holderVotes = 0n; @@ -284,9 +284,9 @@ describe('ERC20Votes', function () { const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, supply, supply - 1n); + .withArgs(this.holder, supply, supply - 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -304,9 +304,9 @@ describe('ERC20Votes', function () { const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -325,11 +325,11 @@ describe('ERC20Votes', function () { const tx = await this.token.connect(this.holder).transfer(this.recipient, 1n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, 1n) + .withArgs(this.holder, this.recipient, 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, supply, supply - 1n) + .withArgs(this.holder, supply, supply - 1n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); diff --git a/test/token/ERC20/extensions/ERC20Wrapper.test.js b/test/token/ERC20/extensions/ERC20Wrapper.test.js index af746d65a..697bfe523 100644 --- a/test/token/ERC20/extensions/ERC20Wrapper.test.js +++ b/test/token/ERC20/extensions/ERC20Wrapper.test.js @@ -48,7 +48,7 @@ describe('ERC20Wrapper', function () { }); it('has underlying', async function () { - expect(await this.token.underlying()).to.be.equal(this.underlying.target); + expect(await this.token.underlying()).to.be.equal(this.underlying); }); describe('deposit', function () { @@ -58,9 +58,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.initialHolder.address, this.token.target, initialSupply) + .withArgs(this.initialHolder, this.token, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.initialHolder.address, initialSupply); + .withArgs(ethers.ZeroAddress, this.initialHolder, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.initialHolder, this.token], @@ -72,7 +72,7 @@ describe('ERC20Wrapper', function () { it('reverts when missing approval', async function () { await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply)) .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientAllowance') - .withArgs(this.token.target, 0, initialSupply); + .withArgs(this.token, 0, initialSupply); }); it('reverts when inssuficient balance', async function () { @@ -80,7 +80,7 @@ describe('ERC20Wrapper', function () { await expect(this.token.connect(this.initialHolder).depositFor(this.initialHolder, ethers.MaxUint256)) .to.be.revertedWithCustomError(this.underlying, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, initialSupply, ethers.MaxUint256); + .withArgs(this.initialHolder, initialSupply, ethers.MaxUint256); }); it('deposits to other account', async function () { @@ -89,9 +89,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).depositFor(this.recipient, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.initialHolder.address, this.token.target, initialSupply) + .withArgs(this.initialHolder, this.token, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); + .withArgs(ethers.ZeroAddress, this.recipient, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.initialHolder, this.token], @@ -105,7 +105,7 @@ describe('ERC20Wrapper', function () { await expect(this.token.connect(this.initialHolder).depositFor(this.token, ethers.MaxUint256)) .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') - .withArgs(this.token.target); + .withArgs(this.token); }); }); @@ -118,7 +118,7 @@ describe('ERC20Wrapper', function () { it('reverts when inssuficient balance', async function () { await expect(this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, ethers.MaxInt256)) .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance') - .withArgs(this.initialHolder.address, initialSupply, ethers.MaxInt256); + .withArgs(this.initialHolder, initialSupply, ethers.MaxInt256); }); it('executes when operation is valid', async function () { @@ -127,9 +127,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, value); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.initialHolder.address, value) + .withArgs(this.token, this.initialHolder, value) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, value); + .withArgs(this.initialHolder, ethers.ZeroAddress, value); await expect(tx).to.changeTokenBalances(this.underlying, [this.token, this.initialHolder], [-value, value]); await expect(tx).to.changeTokenBalance(this.token, this.initialHolder, -value); }); @@ -138,9 +138,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).withdrawTo(this.initialHolder, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.initialHolder.address, initialSupply) + .withArgs(this.token, this.initialHolder, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); + .withArgs(this.initialHolder, ethers.ZeroAddress, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.token, this.initialHolder], @@ -153,9 +153,9 @@ describe('ERC20Wrapper', function () { const tx = await this.token.connect(this.initialHolder).withdrawTo(this.recipient, initialSupply); await expect(tx) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.recipient.address, initialSupply) + .withArgs(this.token, this.recipient, initialSupply) .to.emit(this.token, 'Transfer') - .withArgs(this.initialHolder.address, ethers.ZeroAddress, initialSupply); + .withArgs(this.initialHolder, ethers.ZeroAddress, initialSupply); await expect(tx).to.changeTokenBalances( this.underlying, [this.token, this.initialHolder, this.recipient], @@ -167,7 +167,7 @@ describe('ERC20Wrapper', function () { it('reverts withdrawing to the wrapper contract', async function () { await expect(this.token.connect(this.initialHolder).withdrawTo(this.token, initialSupply)) .to.be.revertedWithCustomError(this.token, 'ERC20InvalidReceiver') - .withArgs(this.token.target); + .withArgs(this.token); }); }); @@ -177,7 +177,7 @@ describe('ERC20Wrapper', function () { await this.token.connect(this.initialHolder).depositFor(this.initialHolder, initialSupply); const tx = await this.token.$_recover(this.recipient); - await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient.address, 0n); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient, 0n); await expect(tx).to.changeTokenBalance(this.token, this.recipient, 0); }); @@ -185,9 +185,7 @@ describe('ERC20Wrapper', function () { await this.underlying.connect(this.initialHolder).transfer(this.token, initialSupply); const tx = await this.token.$_recover(this.recipient); - await expect(tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, initialSupply); + await expect(tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.recipient, initialSupply); await expect(tx).to.changeTokenBalance(this.token, this.recipient, initialSupply); }); }); diff --git a/test/token/ERC20/extensions/ERC4626.test.js b/test/token/ERC20/extensions/ERC4626.test.js index 907855efe..6e6508c68 100644 --- a/test/token/ERC20/extensions/ERC4626.test.js +++ b/test/token/ERC20/extensions/ERC4626.test.js @@ -3,9 +3,7 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); -const { - bigint: { Enum }, -} = require('../../../helpers/enums'); +const { Enum } = require('../../../helpers/enums'); const name = 'My Token'; const symbol = 'MTKN'; @@ -90,10 +88,10 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).deposit(value, this.holder)) // Deposit normally, reentering before the internal `_update` .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.holder.address, value, sharesForDeposit) + .withArgs(this.holder, this.holder, value, sharesForDeposit) // Reentrant deposit event → uses the same price .to.emit(this.vault, 'Deposit') - .withArgs(this.token.target, this.holder.address, reenterValue, sharesForReenter); + .withArgs(this.token, this.holder, reenterValue, sharesForReenter); // Assert prices is kept expect(await this.vault.previewDeposit(value)).to.equal(sharesForDeposit); @@ -123,10 +121,10 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).withdraw(value, this.holder, this.holder)) // Main withdraw event .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.holder.address, this.holder.address, value, sharesForWithdraw) + .withArgs(this.holder, this.holder, this.holder, value, sharesForWithdraw) // Reentrant withdraw event → uses the same price .to.emit(this.vault, 'Withdraw') - .withArgs(this.token.target, this.holder.address, this.token.target, reenterValue, sharesForReenter); + .withArgs(this.token, this.holder, this.token, reenterValue, sharesForReenter); // Assert price is kept expect(await this.vault.previewWithdraw(value)).to.equal(sharesForWithdraw); @@ -150,7 +148,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).deposit(value, this.holder)) // Price is as previewed .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.holder.address, value, sharesBefore); + .withArgs(this.holder, this.holder, value, sharesBefore); // Price was modified during reentrancy expect(await this.vault.previewDeposit(value)).to.lt(sharesBefore); @@ -177,7 +175,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).withdraw(value, this.holder, this.holder)) // Price is as previewed .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.holder.address, this.holder.address, value, sharesBefore); + .withArgs(this.holder, this.holder, this.holder, value, sharesBefore); // Price was modified during reentrancy expect(await this.vault.previewWithdraw(value)).to.gt(sharesBefore); @@ -196,7 +194,7 @@ describe('ERC4626', function () { const maxDeposit = await this.vault.maxDeposit(this.holder); await expect(this.vault.connect(this.holder).deposit(maxDeposit + 1n, this.recipient)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxDeposit') - .withArgs(this.recipient.address, maxDeposit + 1n, maxDeposit); + .withArgs(this.recipient, maxDeposit + 1n, maxDeposit); }); it('reverts on mint() above max mint', async function () { @@ -204,7 +202,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).mint(maxMint + 1n, this.recipient)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxMint') - .withArgs(this.recipient.address, maxMint + 1n, maxMint); + .withArgs(this.recipient, maxMint + 1n, maxMint); }); it('reverts on withdraw() above max withdraw', async function () { @@ -212,7 +210,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).withdraw(maxWithdraw + 1n, this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxWithdraw') - .withArgs(this.holder.address, maxWithdraw + 1n, maxWithdraw); + .withArgs(this.holder, maxWithdraw + 1n, maxWithdraw); }); it('reverts on redeem() above max redeem', async function () { @@ -220,7 +218,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.holder).redeem(maxRedeem + 1n, this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC4626ExceededMaxRedeem') - .withArgs(this.holder.address, maxRedeem + 1n, maxRedeem); + .withArgs(this.holder, maxRedeem + 1n, maxRedeem); }); }); @@ -247,7 +245,7 @@ describe('ERC4626', function () { expect(await this.vault.name()).to.equal(name + ' Vault'); expect(await this.vault.symbol()).to.equal(symbol + 'V'); expect(await this.vault.decimals()).to.equal(decimals + offset); - expect(await this.vault.asset()).to.equal(this.token.target); + expect(await this.vault.asset()).to.equal(this.token); }); describe('empty vault: no assets & no shares', function () { @@ -269,11 +267,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, parseShare(1n)); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, parseToken(1n)) + .withArgs(this.holder, this.vault, parseToken(1n)) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, parseShare(1n)) + .withArgs(ethers.ZeroAddress, this.recipient, parseShare(1n)) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, parseToken(1n), parseShare(1n)); + .withArgs(this.holder, this.recipient, parseToken(1n), parseShare(1n)); }); it('mint', async function () { @@ -290,11 +288,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, parseShare(1n)); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, parseToken(1n)) + .withArgs(this.holder, this.vault, parseToken(1n)) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, parseShare(1n)) + .withArgs(ethers.ZeroAddress, this.recipient, parseShare(1n)) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, parseToken(1n), parseShare(1n)); + .withArgs(this.holder, this.recipient, parseToken(1n), parseShare(1n)); }); it('withdraw', async function () { @@ -307,11 +305,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); it('redeem', async function () { @@ -324,11 +322,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); }); @@ -374,11 +372,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, expectedShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, depositAssets) + .withArgs(this.holder, this.vault, depositAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, expectedShares) + .withArgs(ethers.ZeroAddress, this.recipient, expectedShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, depositAssets, expectedShares); + .withArgs(this.holder, this.recipient, depositAssets, expectedShares); }); /** @@ -412,11 +410,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, mintShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, expectedAssets) + .withArgs(this.holder, this.vault, expectedAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, mintShares) + .withArgs(ethers.ZeroAddress, this.recipient, mintShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, expectedAssets, mintShares); + .withArgs(this.holder, this.recipient, expectedAssets, mintShares); }); it('withdraw', async function () { @@ -429,11 +427,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); it('redeem', async function () { @@ -446,11 +444,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, 0n); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, 0n) + .withArgs(this.vault, this.recipient, 0n) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, 0n) + .withArgs(this.holder, ethers.ZeroAddress, 0n) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, 0n, 0n); + .withArgs(this.holder, this.recipient, this.holder, 0n, 0n); }); }); @@ -495,11 +493,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, expectedShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, depositAssets) + .withArgs(this.holder, this.vault, depositAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, expectedShares) + .withArgs(ethers.ZeroAddress, this.recipient, expectedShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, depositAssets, expectedShares); + .withArgs(this.holder, this.recipient, depositAssets, expectedShares); }); /** @@ -531,11 +529,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.recipient, mintShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, expectedAssets) + .withArgs(this.holder, this.vault, expectedAssets) .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, mintShares) + .withArgs(ethers.ZeroAddress, this.recipient, mintShares) .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, expectedAssets, mintShares); + .withArgs(this.holder, this.recipient, expectedAssets, mintShares); }); it('withdraw', async function () { @@ -558,11 +556,11 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, -expectedShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, withdrawAssets) + .withArgs(this.vault, this.recipient, withdrawAssets) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, expectedShares) + .withArgs(this.holder, ethers.ZeroAddress, expectedShares) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, withdrawAssets, expectedShares); + .withArgs(this.holder, this.recipient, this.holder, withdrawAssets, expectedShares); }); it('withdraw with approval', async function () { @@ -570,7 +568,7 @@ describe('ERC4626', function () { await expect(this.vault.connect(this.other).withdraw(parseToken(1n), this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC20InsufficientAllowance') - .withArgs(this.other.address, 0n, assets); + .withArgs(this.other, 0n, assets); await expect(this.vault.connect(this.spender).withdraw(parseToken(1n), this.recipient, this.holder)).to.not.be .reverted; @@ -596,17 +594,17 @@ describe('ERC4626', function () { await expect(tx).to.changeTokenBalance(this.vault, this.holder, -redeemShares); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, expectedAssets) + .withArgs(this.vault, this.recipient, expectedAssets) .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, redeemShares) + .withArgs(this.holder, ethers.ZeroAddress, redeemShares) .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, expectedAssets, redeemShares); + .withArgs(this.holder, this.recipient, this.holder, expectedAssets, redeemShares); }); it('redeem with approval', async function () { await expect(this.vault.connect(this.other).redeem(parseShare(100n), this.recipient, this.holder)) .to.be.revertedWithCustomError(this.vault, 'ERC20InsufficientAllowance') - .withArgs(this.other.address, 0n, parseShare(100n)); + .withArgs(this.other, 0n, parseShare(100n)); await expect(this.vault.connect(this.spender).redeem(parseShare(100n), this.recipient, this.holder)).to.not.be .reverted; @@ -660,16 +658,16 @@ describe('ERC4626', function () { await expect(this.tx) // get total .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.vault.target, valueWithFees) + .withArgs(this.holder, this.vault, valueWithFees) // redirect fees .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.other.address, fees) + .withArgs(this.vault, this.other, fees) // mint shares .to.emit(this.vault, 'Transfer') - .withArgs(ethers.ZeroAddress, this.recipient.address, valueWithoutFees) + .withArgs(ethers.ZeroAddress, this.recipient, valueWithoutFees) // deposit event .to.emit(this.vault, 'Deposit') - .withArgs(this.holder.address, this.recipient.address, valueWithFees, valueWithoutFees); + .withArgs(this.holder, this.recipient, valueWithFees, valueWithoutFees); }); }); @@ -712,16 +710,16 @@ describe('ERC4626', function () { await expect(this.tx) // withdraw principal .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.recipient.address, valueWithoutFees) + .withArgs(this.vault, this.recipient, valueWithoutFees) // redirect fees .to.emit(this.token, 'Transfer') - .withArgs(this.vault.target, this.other.address, fees) + .withArgs(this.vault, this.other, fees) // mint shares .to.emit(this.vault, 'Transfer') - .withArgs(this.holder.address, ethers.ZeroAddress, valueWithFees) + .withArgs(this.holder, ethers.ZeroAddress, valueWithFees) // withdraw event .to.emit(this.vault, 'Withdraw') - .withArgs(this.holder.address, this.recipient.address, this.holder.address, valueWithoutFees, valueWithFees); + .withArgs(this.holder, this.recipient, this.holder, valueWithoutFees, valueWithFees); }); }); }); @@ -742,9 +740,9 @@ describe('ERC4626', function () { // 1. Alice mints 2000 shares (costs 2000 tokens) await expect(vault.connect(alice).mint(2000n, alice)) .to.emit(token, 'Transfer') - .withArgs(alice.address, vault.target, 2000n) + .withArgs(alice, vault, 2000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, alice.address, 2000n); + .withArgs(ethers.ZeroAddress, alice, 2000n); expect(await vault.previewDeposit(2000n)).to.equal(2000n); expect(await vault.balanceOf(alice)).to.equal(2000n); @@ -758,9 +756,9 @@ describe('ERC4626', function () { // 2. Bruce deposits 4000 tokens (mints 4000 shares) await expect(vault.connect(bruce).mint(4000n, bruce)) .to.emit(token, 'Transfer') - .withArgs(bruce.address, vault.target, 4000n) + .withArgs(bruce, vault, 4000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, bruce.address, 4000n); + .withArgs(ethers.ZeroAddress, bruce, 4000n); expect(await vault.previewDeposit(4000n)).to.equal(4000n); expect(await vault.balanceOf(alice)).to.equal(2000n); @@ -785,9 +783,9 @@ describe('ERC4626', function () { // 4. Alice deposits 2000 tokens (mints 1333 shares) await expect(vault.connect(alice).deposit(2000n, alice)) .to.emit(token, 'Transfer') - .withArgs(alice.address, vault.target, 2000n) + .withArgs(alice, vault, 2000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, alice.address, 1333n); + .withArgs(ethers.ZeroAddress, alice, 1333n); expect(await vault.balanceOf(alice)).to.equal(3333n); expect(await vault.balanceOf(bruce)).to.equal(4000n); @@ -802,9 +800,9 @@ describe('ERC4626', function () { // NOTE: Alices's vault assets got rounded towards infinity await expect(vault.connect(bruce).mint(2000n, bruce)) .to.emit(token, 'Transfer') - .withArgs(bruce.address, vault.target, 3000n) + .withArgs(bruce, vault, 3000n) .to.emit(vault, 'Transfer') - .withArgs(ethers.ZeroAddress, bruce.address, 2000n); + .withArgs(ethers.ZeroAddress, bruce, 2000n); expect(await vault.balanceOf(alice)).to.equal(3333n); expect(await vault.balanceOf(bruce)).to.equal(6000n); @@ -829,9 +827,9 @@ describe('ERC4626', function () { // 7. Alice redeem 1333 shares (2428 assets) await expect(vault.connect(alice).redeem(1333n, alice, alice)) .to.emit(vault, 'Transfer') - .withArgs(alice.address, ethers.ZeroAddress, 1333n) + .withArgs(alice, ethers.ZeroAddress, 1333n) .to.emit(token, 'Transfer') - .withArgs(vault.target, alice.address, 2427n); // used to be 2428 + .withArgs(vault, alice, 2427n); // used to be 2428 expect(await vault.balanceOf(alice)).to.equal(2000n); expect(await vault.balanceOf(bruce)).to.equal(6000n); @@ -844,9 +842,9 @@ describe('ERC4626', function () { // 8. Bruce withdraws 2929 assets (1608 shares) await expect(vault.connect(bruce).withdraw(2929n, bruce, bruce)) .to.emit(vault, 'Transfer') - .withArgs(bruce.address, ethers.ZeroAddress, 1608n) + .withArgs(bruce, ethers.ZeroAddress, 1608n) .to.emit(token, 'Transfer') - .withArgs(vault.target, bruce.address, 2929n); + .withArgs(vault, bruce, 2929n); expect(await vault.balanceOf(alice)).to.equal(2000n); expect(await vault.balanceOf(bruce)).to.equal(4392n); @@ -860,9 +858,9 @@ describe('ERC4626', function () { // NOTE: Bruce's assets have been rounded back towards infinity await expect(vault.connect(alice).withdraw(3643n, alice, alice)) .to.emit(vault, 'Transfer') - .withArgs(alice.address, ethers.ZeroAddress, 2000n) + .withArgs(alice, ethers.ZeroAddress, 2000n) .to.emit(token, 'Transfer') - .withArgs(vault.target, alice.address, 3643n); + .withArgs(vault, alice, 3643n); expect(await vault.balanceOf(alice)).to.equal(0n); expect(await vault.balanceOf(bruce)).to.equal(4392n); @@ -875,9 +873,9 @@ describe('ERC4626', function () { // 10. Bruce redeem 4392 shares (8001 tokens) await expect(vault.connect(bruce).redeem(4392n, bruce, bruce)) .to.emit(vault, 'Transfer') - .withArgs(bruce.address, ethers.ZeroAddress, 4392n) + .withArgs(bruce, ethers.ZeroAddress, 4392n) .to.emit(token, 'Transfer') - .withArgs(vault.target, bruce.address, 8000n); // used to be 8001 + .withArgs(vault, bruce, 8000n); // used to be 8001 expect(await vault.balanceOf(alice)).to.equal(0n); expect(await vault.balanceOf(bruce)).to.equal(0n); diff --git a/test/token/ERC20/utils/SafeERC20.test.js b/test/token/ERC20/utils/SafeERC20.test.js index e710a3241..80d394edd 100644 --- a/test/token/ERC20/utils/SafeERC20.test.js +++ b/test/token/ERC20/utils/SafeERC20.test.js @@ -40,13 +40,13 @@ describe('SafeERC20', function () { it('reverts on transfer', async function () { await expect(this.mock.$safeTransfer(this.token, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.token.address); + .withArgs(this.token); }); it('reverts on transferFrom', async function () { await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.token.address); + .withArgs(this.token); }); it('reverts on increaseAllowance', async function () { @@ -62,7 +62,7 @@ describe('SafeERC20', function () { it('reverts on forceApprove', async function () { await expect(this.mock.$forceApprove(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.token.address); + .withArgs(this.token); }); }); @@ -74,31 +74,31 @@ describe('SafeERC20', function () { it('reverts on transfer', async function () { await expect(this.mock.$safeTransfer(this.token, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on transferFrom', async function () { await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on increaseAllowance', async function () { await expect(this.mock.$safeIncreaseAllowance(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on decreaseAllowance', async function () { await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); it('reverts on forceApprove', async function () { await expect(this.mock.$forceApprove(this.token, this.spender, 0n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation') - .withArgs(this.token.target); + .withArgs(this.token); }); }); @@ -157,13 +157,13 @@ function shouldOnlyRevertOnErrors() { it("doesn't revert on transfer", async function () { await expect(this.mock.$safeTransfer(this.token, this.receiver, 10n)) .to.emit(this.token, 'Transfer') - .withArgs(this.mock.target, this.receiver.address, 10n); + .withArgs(this.mock, this.receiver, 10n); }); it("doesn't revert on transferFrom", async function () { await expect(this.mock.$safeTransferFrom(this.token, this.owner, this.receiver, 10n)) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, this.receiver.address, 10n); + .withArgs(this.owner, this.receiver, 10n); }); }); @@ -191,7 +191,7 @@ function shouldOnlyRevertOnErrors() { it('reverts when decreasing the allowance', async function () { await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 10n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedDecreaseAllowance') - .withArgs(this.spender.address, 0n, 10n); + .withArgs(this.spender, 0n, 10n); }); }); @@ -223,7 +223,7 @@ function shouldOnlyRevertOnErrors() { it('reverts when decreasing the allowance to a negative value', async function () { await expect(this.mock.$safeDecreaseAllowance(this.token, this.spender, 200n)) .to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedDecreaseAllowance') - .withArgs(this.spender.address, 100n, 200n); + .withArgs(this.spender, 100n, 200n); }); }); }); diff --git a/test/token/ERC721/ERC721.behavior.js b/test/token/ERC721/ERC721.behavior.js index ff441f5e6..b9fd56f06 100644 --- a/test/token/ERC721/ERC721.behavior.js +++ b/test/token/ERC721/ERC721.behavior.js @@ -4,9 +4,7 @@ const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); const { anyValue } = require('@nomicfoundation/hardhat-chai-matchers/withArgs'); const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior'); -const { - bigint: { RevertType }, -} = require('../../helpers/enums'); +const { RevertType } = require('../../helpers/enums'); const firstTokenId = 5042n; const secondTokenId = 79217n; @@ -58,7 +56,7 @@ function shouldBehaveLikeERC721() { const tokenId = firstTokenId; it('returns the owner of the given token ID', async function () { - expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner); }); }); @@ -85,13 +83,11 @@ function shouldBehaveLikeERC721() { const transferWasSuccessful = () => { it('transfers the ownership of the given token ID to the given address', async function () { await this.tx(); - expect(await this.token.ownerOf(tokenId)).to.equal(this.to.address ?? this.to.target); + expect(await this.token.ownerOf(tokenId)).to.equal(this.to); }); it('emits a Transfer event', async function () { - await expect(this.tx()) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, this.to.address ?? this.to.target, tokenId); + await expect(this.tx()).to.emit(this.token, 'Transfer').withArgs(this.owner, this.to, tokenId); }); it('clears the approval for the token ID with no event', async function () { @@ -157,7 +153,7 @@ function shouldBehaveLikeERC721() { it('keeps ownership of the token', async function () { await this.tx(); - expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner); }); it('clears the approval for the token ID', async function () { @@ -166,9 +162,7 @@ function shouldBehaveLikeERC721() { }); it('emits only a transfer event', async function () { - await expect(this.tx()) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, this.owner.address, tokenId); + await expect(this.tx()).to.emit(this.token, 'Transfer').withArgs(this.owner, this.owner, tokenId); }); it('keeps the owner balance', async function () { @@ -192,7 +186,7 @@ function shouldBehaveLikeERC721() { this.token.connect(this.owner)[fragment](this.other, this.other, tokenId, ...(opts.extra ?? [])), ) .to.be.revertedWithCustomError(this.token, 'ERC721IncorrectOwner') - .withArgs(this.other.address, tokenId, this.owner.address); + .withArgs(this.other, tokenId, this.owner); }); }); @@ -207,7 +201,7 @@ function shouldBehaveLikeERC721() { this.token.connect(this.other)[fragment](this.owner, this.other, tokenId, ...(opts.extra ?? [])), ) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.other.address, tokenId); + .withArgs(this.other, tokenId); }); } }); @@ -255,7 +249,7 @@ function shouldBehaveLikeERC721() { it('calls onERC721Received', async function () { await expect(this.token.connect(this.owner)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? []))) .to.emit(this.to, 'Received') - .withArgs(this.owner.address, this.owner.address, tokenId, data, anyValue); + .withArgs(this.owner, this.owner, tokenId, data, anyValue); }); it('calls onERC721Received from approved', async function () { @@ -263,7 +257,7 @@ function shouldBehaveLikeERC721() { this.token.connect(this.approved)[fragment](this.owner, this.to, tokenId, ...(opts.extra ?? [])), ) .to.emit(this.to, 'Received') - .withArgs(this.approved.address, this.owner.address, tokenId, data, anyValue); + .withArgs(this.approved, this.owner, tokenId, data, anyValue); }); describe('with an invalid token id', function () { @@ -311,7 +305,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.owner)[fnName](this.owner, invalidReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(invalidReceiver.target); + .withArgs(invalidReceiver); }); }); @@ -337,7 +331,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.owner)[fnName](this.owner, revertingReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(revertingReceiver.target); + .withArgs(revertingReceiver); }); }); @@ -373,7 +367,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.owner)[fnName](this.owner, nonReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(nonReceiver.target); + .withArgs(nonReceiver); }); }); }); @@ -408,7 +402,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.$_safeMint(invalidReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(invalidReceiver.target); + .withArgs(invalidReceiver); }); }); @@ -434,7 +428,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.$_safeMint(revertingReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(revertingReceiver.target); + .withArgs(revertingReceiver); }); }); @@ -470,7 +464,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.$_safeMint(nonReceiver, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidReceiver') - .withArgs(nonReceiver.target); + .withArgs(nonReceiver); }); }); }); @@ -487,7 +481,7 @@ function shouldBehaveLikeERC721() { const itApproves = function () { it('sets the approval for the target address', async function () { - expect(await this.token.getApproved(tokenId)).to.equal(this.approved.address ?? this.approved); + expect(await this.token.getApproved(tokenId)).to.equal(this.approved ?? this.approved); }); }; @@ -495,7 +489,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.tx) .to.emit(this.token, 'Approval') - .withArgs(this.owner.address, this.approved.address ?? this.approved, tokenId); + .withArgs(this.owner, this.approved ?? this.approved, tokenId); }); }; @@ -557,7 +551,7 @@ function shouldBehaveLikeERC721() { it('reverts', async function () { await expect(this.token.connect(this.other).approve(this.approved, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidApprover') - .withArgs(this.other.address); + .withArgs(this.other); }); }); @@ -567,7 +561,7 @@ function shouldBehaveLikeERC721() { await expect(this.token.connect(this.approved).approve(this.other, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InvalidApprover') - .withArgs(this.approved.address); + .withArgs(this.approved); }); }); @@ -603,7 +597,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.owner.address, this.operator.address, true); + .withArgs(this.owner, this.operator, true); }); }); @@ -621,7 +615,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.owner.address, this.operator.address, true); + .withArgs(this.owner, this.operator, true); }); it('can unset the operator approval', async function () { @@ -645,7 +639,7 @@ function shouldBehaveLikeERC721() { it('emits an approval event', async function () { await expect(this.token.connect(this.owner).setApprovalForAll(this.operator, true)) .to.emit(this.token, 'ApprovalForAll') - .withArgs(this.owner.address, this.operator.address, true); + .withArgs(this.owner, this.operator, true); }); }); }); @@ -679,7 +673,7 @@ function shouldBehaveLikeERC721() { }); it('returns approved account', async function () { - expect(await this.token.getApproved(firstTokenId)).to.equal(this.approved.address); + expect(await this.token.getApproved(firstTokenId)).to.equal(this.approved); }); }); }); @@ -699,14 +693,12 @@ function shouldBehaveLikeERC721() { }); it('emits a Transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, firstTokenId); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(ethers.ZeroAddress, this.owner, firstTokenId); }); it('creates the token', async function () { expect(await this.token.balanceOf(this.owner)).to.equal(1n); - expect(await this.token.ownerOf(firstTokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(firstTokenId)).to.equal(this.owner); }); it('reverts when adding a token id that already exists', async function () { @@ -736,9 +728,7 @@ function shouldBehaveLikeERC721() { }); it('emits a Transfer event', async function () { - await expect(this.tx) - .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, firstTokenId); + await expect(this.tx).to.emit(this.token, 'Transfer').withArgs(this.owner, ethers.ZeroAddress, firstTokenId); }); it('deletes the token', async function () { @@ -790,7 +780,7 @@ function shouldBehaveLikeERC721Enumerable() { it('reverts', async function () { await expect(this.token.tokenOfOwnerByIndex(this.owner, 2n)) .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') - .withArgs(this.owner.address, 2n); + .withArgs(this.owner, 2n); }); }); @@ -798,7 +788,7 @@ function shouldBehaveLikeERC721Enumerable() { it('reverts', async function () { await expect(this.token.tokenOfOwnerByIndex(this.other, 0n)) .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') - .withArgs(this.other.address, 0n); + .withArgs(this.other, 0n); }); }); @@ -821,7 +811,7 @@ function shouldBehaveLikeERC721Enumerable() { expect(await this.token.balanceOf(this.owner)).to.equal(0n); await expect(this.token.tokenOfOwnerByIndex(this.owner, 0n)) .to.be.revertedWithCustomError(this.token, 'ERC721OutOfBoundsIndex') - .withArgs(this.owner.address, 0n); + .withArgs(this.owner, 0n); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Burnable.test.js b/test/token/ERC721/extensions/ERC721Burnable.test.js index 0a5e838fe..95504d3f5 100644 --- a/test/token/ERC721/extensions/ERC721Burnable.test.js +++ b/test/token/ERC721/extensions/ERC721Burnable.test.js @@ -32,7 +32,7 @@ describe('ERC721Burnable', function () { await expect(this.token.connect(this.owner).burn(tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); await expect(this.token.ownerOf(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') @@ -61,7 +61,7 @@ describe('ERC721Burnable', function () { it('reverts', async function () { await expect(this.token.connect(this.another).burn(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.another.address, tokenId); + .withArgs(this.another, tokenId); }); }); diff --git a/test/token/ERC721/extensions/ERC721Consecutive.test.js b/test/token/ERC721/extensions/ERC721Consecutive.test.js index b83e2feb4..d2eda944c 100644 --- a/test/token/ERC721/extensions/ERC721Consecutive.test.js +++ b/test/token/ERC721/extensions/ERC721Consecutive.test.js @@ -51,7 +51,7 @@ describe('ERC721Consecutive', function () { first /* fromTokenId */, first + batch.amount - 1n /* toTokenId */, ethers.ZeroAddress /* fromAddress */, - batch.receiver.address /* toAddress */, + batch.receiver /* toAddress */, ); } else { // ".to.not.emit" only looks at event name, and doesn't check the parameters @@ -125,7 +125,7 @@ describe('ERC721Consecutive', function () { await expect(this.token.$_mint(this.alice, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.alice.address, tokenId); + .withArgs(ethers.ZeroAddress, this.alice, tokenId); }); it('cannot mint a token that has been batched minted', async function () { @@ -145,13 +145,13 @@ describe('ERC721Consecutive', function () { it('core takes over ownership on transfer', async function () { await this.token.connect(this.alice).transferFrom(this.alice, this.receiver, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.receiver.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.receiver); }); it('tokens can be burned and re-minted #1', async function () { await expect(this.token.connect(this.alice).$_burn(tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(this.alice.address, ethers.ZeroAddress, tokenId); + .withArgs(this.alice, ethers.ZeroAddress, tokenId); await expect(this.token.ownerOf(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') @@ -159,9 +159,9 @@ describe('ERC721Consecutive', function () { await expect(this.token.$_mint(this.bruce, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.bruce.address, tokenId); + .withArgs(ethers.ZeroAddress, this.bruce, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce); }); it('tokens can be burned and re-minted #2', async function () { @@ -174,14 +174,14 @@ describe('ERC721Consecutive', function () { // mint await expect(this.token.$_mint(this.alice, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.alice.address, tokenId); + .withArgs(ethers.ZeroAddress, this.alice, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.alice.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.alice); // burn await expect(await this.token.$_burn(tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(this.alice.address, ethers.ZeroAddress, tokenId); + .withArgs(this.alice, ethers.ZeroAddress, tokenId); await expect(this.token.ownerOf(tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken') @@ -190,9 +190,9 @@ describe('ERC721Consecutive', function () { // re-mint await expect(this.token.$_mint(this.bruce, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.bruce.address, tokenId); + .withArgs(ethers.ZeroAddress, this.bruce, tokenId); - expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.bruce); }); }); }); diff --git a/test/token/ERC721/extensions/ERC721Pausable.test.js b/test/token/ERC721/extensions/ERC721Pausable.test.js index 2be0c902d..56585e744 100644 --- a/test/token/ERC721/extensions/ERC721Pausable.test.js +++ b/test/token/ERC721/extensions/ERC721Pausable.test.js @@ -68,7 +68,7 @@ describe('ERC721Pausable', function () { describe('ownerOf', function () { it('returns the amount of tokens owned by the given address', async function () { - expect(await this.token.ownerOf(tokenId)).to.equal(this.owner.address); + expect(await this.token.ownerOf(tokenId)).to.equal(this.owner); }); }); diff --git a/test/token/ERC721/extensions/ERC721URIStorage.test.js b/test/token/ERC721/extensions/ERC721URIStorage.test.js index 3a74f55ca..830c13a73 100644 --- a/test/token/ERC721/extensions/ERC721URIStorage.test.js +++ b/test/token/ERC721/extensions/ERC721URIStorage.test.js @@ -18,7 +18,7 @@ async function fixture() { return { owner, token }; } -contract('ERC721URIStorage', function () { +describe('ERC721URIStorage', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/token/ERC721/extensions/ERC721Votes.test.js b/test/token/ERC721/extensions/ERC721Votes.test.js index f52e9ca95..dcae1b8d2 100644 --- a/test/token/ERC721/extensions/ERC721Votes.test.js +++ b/test/token/ERC721/extensions/ERC721Votes.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture, mine } = require('@nomicfoundation/hardhat-network-helpers'); -const { bigint: time } = require('../../../helpers/time'); +const time = require('../../../helpers/time'); const { shouldBehaveLikeVotes } = require('../../../governance/utils/Votes.behavior'); @@ -58,7 +58,7 @@ describe('ERC721Votes', function () { it('no delegation', async function () { await expect(this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0])) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.not.emit(this.token, 'DelegateVotesChanged'); this.holderVotes = 0n; @@ -71,9 +71,9 @@ describe('ERC721Votes', function () { const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 1n, 0n); + .withArgs(this.holder, 1n, 0n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -91,9 +91,9 @@ describe('ERC721Votes', function () { const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); @@ -112,11 +112,11 @@ describe('ERC721Votes', function () { const tx = await this.votes.connect(this.holder).transferFrom(this.holder, this.recipient, tokens[0]); await expect(tx) .to.emit(this.token, 'Transfer') - .withArgs(this.holder.address, this.recipient.address, tokens[0]) + .withArgs(this.holder, this.recipient, tokens[0]) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.holder.address, 1n, 0n) + .withArgs(this.holder, 1n, 0n) .to.emit(this.token, 'DelegateVotesChanged') - .withArgs(this.recipient.address, 0n, 1n); + .withArgs(this.recipient, 0n, 1n); const { logs } = await tx.wait(); const { index } = logs.find(event => event.fragment.name == 'DelegateVotesChanged'); diff --git a/test/token/ERC721/extensions/ERC721Wrapper.test.js b/test/token/ERC721/extensions/ERC721Wrapper.test.js index 2c093a087..eeead4c1f 100644 --- a/test/token/ERC721/extensions/ERC721Wrapper.test.js +++ b/test/token/ERC721/extensions/ERC721Wrapper.test.js @@ -35,7 +35,7 @@ describe('ERC721Wrapper', function () { }); it('has underlying', async function () { - expect(await this.token.underlying()).to.equal(this.underlying.target); + expect(await this.token.underlying()).to.equal(this.underlying); }); describe('depositFor', function () { @@ -44,9 +44,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); + .withArgs(ethers.ZeroAddress, this.owner, tokenId); }); it('works with approval for all', async function () { @@ -54,9 +54,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); + .withArgs(ethers.ZeroAddress, this.owner, tokenId); }); it('works sending to another account', async function () { @@ -64,9 +64,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.other, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.other.address, tokenId); + .withArgs(ethers.ZeroAddress, this.other, tokenId); }); it('works with multiple tokens', async function () { @@ -75,19 +75,19 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId, otherTokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, tokenId) + .withArgs(this.owner, this.token, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId) + .withArgs(ethers.ZeroAddress, this.owner, tokenId) .to.emit(this.underlying, 'Transfer') - .withArgs(this.owner.address, this.token.target, otherTokenId) + .withArgs(this.owner, this.token, otherTokenId) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, otherTokenId); + .withArgs(ethers.ZeroAddress, this.owner, otherTokenId); }); it('reverts with missing approval', async function () { await expect(this.token.connect(this.owner).depositFor(this.owner, [tokenId])) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.token.target, tokenId); + .withArgs(this.token, tokenId); }); }); @@ -100,9 +100,9 @@ describe('ERC721Wrapper', function () { it('works for an owner', async function () { await expect(this.token.connect(this.owner).withdrawTo(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it('works for an approved', async function () { @@ -110,9 +110,9 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.approved).withdrawTo(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it('works for an approved for all', async function () { @@ -120,15 +120,15 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.approved).withdrawTo(this.owner, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it("doesn't work for a non-owner nor approved", async function () { await expect(this.token.connect(this.other).withdrawTo(this.owner, [tokenId])) .to.be.revertedWithCustomError(this.token, 'ERC721InsufficientApproval') - .withArgs(this.other.address, tokenId); + .withArgs(this.other, tokenId); }); it('works with multiple tokens', async function () { @@ -137,21 +137,21 @@ describe('ERC721Wrapper', function () { await expect(this.token.connect(this.owner).withdrawTo(this.owner, [tokenId, otherTokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.owner.address, tokenId) + .withArgs(this.token, this.owner, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId) + .withArgs(this.owner, ethers.ZeroAddress, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); it('works to another account', async function () { await expect(this.token.connect(this.owner).withdrawTo(this.other, [tokenId])) .to.emit(this.underlying, 'Transfer') - .withArgs(this.token.target, this.other.address, tokenId) + .withArgs(this.token, this.other, tokenId) .to.emit(this.token, 'Transfer') - .withArgs(this.owner.address, ethers.ZeroAddress, tokenId); + .withArgs(this.owner, ethers.ZeroAddress, tokenId); }); }); @@ -166,13 +166,13 @@ describe('ERC721Wrapper', function () { ), ) .to.be.revertedWithCustomError(this.token, 'ERC721UnsupportedToken') - .withArgs(this.other.address); + .withArgs(this.other); }); it('mints a token to from', async function () { await expect(this.underlying.connect(this.owner).safeTransferFrom(this.owner, this.token, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.owner.address, tokenId); + .withArgs(ethers.ZeroAddress, this.owner, tokenId); }); }); @@ -183,7 +183,7 @@ describe('ERC721Wrapper', function () { await expect(this.token.$_recover(this.other, tokenId)) .to.emit(this.token, 'Transfer') - .withArgs(ethers.ZeroAddress, this.other.address, tokenId); + .withArgs(ethers.ZeroAddress, this.other, tokenId); }); it('reverts if there is nothing to recover', async function () { @@ -191,7 +191,7 @@ describe('ERC721Wrapper', function () { await expect(this.token.$_recover(holder, tokenId)) .to.be.revertedWithCustomError(this.token, 'ERC721IncorrectOwner') - .withArgs(this.token.target, tokenId, holder); + .withArgs(this.token, tokenId, holder); }); }); diff --git a/test/token/ERC721/utils/ERC721Holder.test.js b/test/token/ERC721/utils/ERC721Holder.test.js index 01b774930..31dd2fd20 100644 --- a/test/token/ERC721/utils/ERC721Holder.test.js +++ b/test/token/ERC721/utils/ERC721Holder.test.js @@ -15,6 +15,6 @@ describe('ERC721Holder', function () { const receiver = await ethers.deployContract('$ERC721Holder'); await token.connect(owner).safeTransferFrom(owner, receiver, tokenId); - expect(await token.ownerOf(tokenId)).to.equal(receiver.target); + expect(await token.ownerOf(tokenId)).to.equal(receiver); }); }); diff --git a/test/utils/Address.test.js b/test/utils/Address.test.js index 6186d18a7..bdfd64bf9 100644 --- a/test/utils/Address.test.js +++ b/test/utils/Address.test.js @@ -29,7 +29,7 @@ describe('Address', function () { it('reverts when sending non-zero amounts', async function () { await expect(this.mock.$sendValue(this.other, 1)) .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') - .withArgs(this.mock.target); + .withArgs(this.mock); }); }); @@ -42,7 +42,7 @@ describe('Address', function () { describe('with EOA recipient', function () { it('sends 0 wei', async function () { - await expect(this.mock.$sendValue(this.recipient, 0)).to.changeEtherBalance(this.recipient.address, 0); + await expect(this.mock.$sendValue(this.recipient, 0)).to.changeEtherBalance(this.recipient, 0); }); it('sends non-zero amounts', async function () { @@ -60,7 +60,7 @@ describe('Address', function () { it('reverts when sending more than the balance', async function () { await expect(this.mock.$sendValue(this.recipient, funds + 1n)) .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') - .withArgs(this.mock.target); + .withArgs(this.mock); }); }); @@ -145,7 +145,7 @@ describe('Address', function () { await expect(this.mock.$functionCall(this.recipient, call)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.recipient.address); + .withArgs(this.recipient); }); }); }); @@ -170,7 +170,7 @@ describe('Address', function () { await expect(this.mock.$functionCallWithValue(this.target, call, value)) .to.be.revertedWithCustomError(this.mock, 'AddressInsufficientBalance') - .withArgs(this.mock.target); + .withArgs(this.mock); }); it('calls the requested function with existing value', async function () { @@ -240,7 +240,7 @@ describe('Address', function () { await expect(this.mock.$functionStaticCall(this.recipient, call)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.recipient.address); + .withArgs(this.recipient); }); }); @@ -273,7 +273,7 @@ describe('Address', function () { await expect(this.mock.$functionDelegateCall(this.recipient, call)) .to.be.revertedWithCustomError(this.mock, 'AddressEmptyCode') - .withArgs(this.recipient.address); + .withArgs(this.recipient); }); }); diff --git a/test/utils/Context.behavior.js b/test/utils/Context.behavior.js index 9e986db7a..adb140fc1 100644 --- a/test/utils/Context.behavior.js +++ b/test/utils/Context.behavior.js @@ -12,15 +12,13 @@ function shouldBehaveLikeRegularContext() { describe('msgSender', function () { it('returns the transaction sender when called from an EOA', async function () { - await expect(this.context.connect(this.sender).msgSender()) - .to.emit(this.context, 'Sender') - .withArgs(this.sender.address); + await expect(this.context.connect(this.sender).msgSender()).to.emit(this.context, 'Sender').withArgs(this.sender); }); it('returns the transaction sender when called from another contract', async function () { await expect(this.contextHelper.connect(this.sender).callSender(this.context)) .to.emit(this.context, 'Sender') - .withArgs(this.contextHelper.target); + .withArgs(this.contextHelper); }); }); diff --git a/test/utils/Create2.test.js b/test/utils/Create2.test.js index df807e757..86d00e131 100644 --- a/test/utils/Create2.test.js +++ b/test/utils/Create2.test.js @@ -68,7 +68,7 @@ describe('Create2', function () { .to.emit(this.factory, 'return$deploy') .withArgs(offChainComputed); - expect(this.constructorLessBytecode).to.include((await web3.eth.getCode(offChainComputed)).slice(2)); + expect(this.constructorLessBytecode).to.include((await ethers.provider.getCode(offChainComputed)).slice(2)); }); it('deploys a contract with constructor arguments', async function () { @@ -84,7 +84,7 @@ describe('Create2', function () { const instance = await ethers.getContractAt('VestingWallet', offChainComputed); - expect(await instance.owner()).to.equal(this.other.address); + expect(await instance.owner()).to.equal(this.other); }); it('deploys a contract with funds deposited in the factory', async function () { diff --git a/test/utils/Multicall.test.js b/test/utils/Multicall.test.js index 7ec7e20ce..9c84e443a 100644 --- a/test/utils/Multicall.test.js +++ b/test/utils/Multicall.test.js @@ -29,9 +29,9 @@ describe('Multicall', function () { ]), ) .to.emit(this.mock, 'Transfer') - .withArgs(this.holder.address, this.alice.address, this.amount / 2n) + .withArgs(this.holder, this.alice, this.amount / 2n) .to.emit(this.mock, 'Transfer') - .withArgs(this.holder.address, this.bruce.address, this.amount / 3n); + .withArgs(this.holder, this.bruce, this.amount / 3n); expect(await this.mock.balanceOf(this.alice)).to.equal(this.amount / 2n); expect(await this.mock.balanceOf(this.bruce)).to.equal(this.amount / 3n); @@ -54,7 +54,7 @@ describe('Multicall', function () { ]), ) .to.be.revertedWithCustomError(this.mock, 'ERC20InsufficientBalance') - .withArgs(this.holder.address, 0, this.amount); + .withArgs(this.holder, 0, this.amount); expect(await this.mock.balanceOf(this.alice)).to.equal(0n); }); @@ -67,6 +67,6 @@ describe('Multicall', function () { ]), ) .to.be.revertedWithCustomError(this.mock, 'ERC20InsufficientBalance') - .withArgs(this.holder.address, 0, this.amount); + .withArgs(this.holder, 0, this.amount); }); }); diff --git a/test/utils/Nonces.test.js b/test/utils/Nonces.test.js index 18d20defb..2cb4798de 100644 --- a/test/utils/Nonces.test.js +++ b/test/utils/Nonces.test.js @@ -69,7 +69,7 @@ describe('Nonces', function () { await expect(this.mock.$_useCheckedNonce(this.sender, currentNonce + 1n)) .to.be.revertedWithCustomError(this.mock, 'InvalidAccountNonce') - .withArgs(this.sender.address, currentNonce); + .withArgs(this.sender, currentNonce); }); }); }); diff --git a/test/utils/Pausable.test.js b/test/utils/Pausable.test.js index de46bc46b..67d74a0d8 100644 --- a/test/utils/Pausable.test.js +++ b/test/utils/Pausable.test.js @@ -39,7 +39,7 @@ describe('Pausable', function () { }); it('emits a Paused event', async function () { - await expect(this.tx).to.emit(this.mock, 'Paused').withArgs(this.pauser.address); + await expect(this.tx).to.emit(this.mock, 'Paused').withArgs(this.pauser); }); it('cannot perform normal process in pause', async function () { @@ -67,7 +67,7 @@ describe('Pausable', function () { }); it('emits an Unpaused event', async function () { - await expect(this.tx).to.emit(this.mock, 'Unpaused').withArgs(this.pauser.address); + await expect(this.tx).to.emit(this.mock, 'Unpaused').withArgs(this.pauser); }); it('should resume allowing normal process', async function () { diff --git a/test/utils/cryptography/ECDSA.test.js b/test/utils/cryptography/ECDSA.test.js index 3c0ce76c6..6b24bdbce 100644 --- a/test/utils/cryptography/ECDSA.test.js +++ b/test/utils/cryptography/ECDSA.test.js @@ -6,10 +6,6 @@ const TEST_MESSAGE = ethers.id('OpenZeppelin'); const WRONG_MESSAGE = ethers.id('Nope'); const NON_HASH_MESSAGE = '0xabcd'; -function toSignature(signature) { - return ethers.Signature.from(signature); -} - async function fixture() { const [signer] = await ethers.getSigners(); const mock = await ethers.deployContract('$ECDSA'); @@ -48,7 +44,7 @@ describe('ECDSA', function () { const signature = await this.signer.signMessage(TEST_MESSAGE); // Recover the signer address from the generated message and signature. - expect(await this.mock.$recover(ethers.hashMessage(TEST_MESSAGE), signature)).to.equal(this.signer.address); + expect(await this.mock.$recover(ethers.hashMessage(TEST_MESSAGE), signature)).to.equal(this.signer); }); it('returns signer address with correct signature for arbitrary length message', async function () { @@ -56,12 +52,12 @@ describe('ECDSA', function () { const signature = await this.signer.signMessage(NON_HASH_MESSAGE); // Recover the signer address from the generated message and signature. - expect(await this.mock.$recover(ethers.hashMessage(NON_HASH_MESSAGE), signature)).to.equal(this.signer.address); + expect(await this.mock.$recover(ethers.hashMessage(NON_HASH_MESSAGE), signature)).to.equal(this.signer); }); it('returns a different address', async function () { const signature = await this.signer.signMessage(TEST_MESSAGE); - expect(await this.mock.$recover(WRONG_MESSAGE, signature)).to.not.be.equal(this.signer.address); + expect(await this.mock.$recover(WRONG_MESSAGE, signature)).to.not.be.equal(this.signer); }); it('reverts with invalid signature', async function () { @@ -76,7 +72,6 @@ describe('ECDSA', function () { }); describe('with v=27 signature', function () { - // Signature generated outside ganache with method web3.eth.sign(signer, message) const signer = '0x2cc1166f6212628A0deEf2B33BEFB2187D35b86c'; // eslint-disable-next-line max-len const signatureWithoutV = @@ -87,7 +82,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect(await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)).to.equal( signer, ); @@ -100,7 +95,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect( await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.not.equal(signer); @@ -118,7 +113,7 @@ describe('ECDSA', function () { 'ECDSAInvalidSignature', ); - const { r, s } = toSignature(signature); + const { r, s } = ethers.Signature.from(signature); await expect( this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignature'); @@ -128,7 +123,9 @@ describe('ECDSA', function () { it('rejects short EIP2098 format', async function () { const v = '0x1b'; // 27 = 1b. const signature = ethers.concat([signatureWithoutV, v]); - await expect(this.mock.$recover(TEST_MESSAGE, toSignature(signature).compactSerialized)) + + const { compactSerialized } = ethers.Signature.from(signature); + await expect(this.mock.$recover(TEST_MESSAGE, compactSerialized)) .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') .withArgs(64); }); @@ -145,7 +142,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect(await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)).to.equal( signer, ); @@ -158,7 +155,7 @@ describe('ECDSA', function () { const signature = ethers.concat([signatureWithoutV, v]); expect(await this.mock.$recover(TEST_MESSAGE, signature)).to.not.equal(signer); - const { r, s, yParityAndS: vs } = toSignature(signature); + const { r, s, yParityAndS: vs } = ethers.Signature.from(signature); expect( await this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.not.equal(signer); @@ -176,7 +173,7 @@ describe('ECDSA', function () { 'ECDSAInvalidSignature', ); - const { r, s } = toSignature(signature); + const { r, s } = ethers.Signature.from(signature); await expect( this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s), ).to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignature'); @@ -184,9 +181,11 @@ describe('ECDSA', function () { }); it('rejects short EIP2098 format', async function () { - const v = '0x1c'; // 27 = 1b. + const v = '0x1b'; // 28 = 1b. const signature = ethers.concat([signatureWithoutV, v]); - await expect(this.mock.$recover(TEST_MESSAGE, toSignature(signature).compactSerialized)) + + const { compactSerialized } = ethers.Signature.from(signature); + await expect(this.mock.$recover(TEST_MESSAGE, compactSerialized)) .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureLength') .withArgs(64); }); @@ -208,7 +207,7 @@ describe('ECDSA', function () { await expect(this.mock.getFunction('$recover(bytes32,uint8,bytes32,bytes32)')(TEST_MESSAGE, v, r, s)) .to.be.revertedWithCustomError(this.mock, 'ECDSAInvalidSignatureS') .withArgs(s); - expect(() => toSignature(highSSignature)).to.throw('non-canonical s'); + expect(() => ethers.Signature.from(highSSignature)).to.throw('non-canonical s'); }); }); }); diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js index 03a5b7cca..166038b36 100644 --- a/test/utils/cryptography/EIP712.test.js +++ b/test/utils/cryptography/EIP712.test.js @@ -4,7 +4,6 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { getDomain, domainSeparator, hashTypedData } = require('../../helpers/eip712'); const { formatType } = require('../../helpers/eip712-types'); -const { getChainId } = require('../../helpers/chainid'); const LENGTHS = { short: ['A Name', '1'], @@ -21,7 +20,7 @@ const fixture = async () => { lengths[shortOrLong].domain = { name, version, - chainId: await getChainId(), + chainId: await ethers.provider.getNetwork().then(({ chainId }) => chainId), verifyingContract: lengths[shortOrLong].eip712.target, }; } diff --git a/test/utils/introspection/ERC165.test.js b/test/utils/introspection/ERC165.test.js index d72791218..83d861ba1 100644 --- a/test/utils/introspection/ERC165.test.js +++ b/test/utils/introspection/ERC165.test.js @@ -9,7 +9,7 @@ async function fixture() { }; } -contract('ERC165', function () { +describe('ERC165', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 83b264592..27d153170 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const { selector, interfaceId } = require('../../helpers/methods'); +const { interfaceId } = require('../../helpers/methods'); const { mapValues } = require('../../helpers/iterate'); const INVALID_ID = '0xffffffff'; @@ -123,15 +123,6 @@ function shouldSupportInterfaces(interfaces = []) { // Check the presence of each function in the contract's interface for (const fnSig of SIGNATURES[k]) { - // TODO: Remove Truffle case when ethersjs migration is done - if (this.contractUnderTest.abi) { - const fnSelector = selector(fnSig); - return expect(this.contractUnderTest.abi.filter(fn => fn.signature === fnSelector).length).to.equal( - 1, - `did not find ${fnSig}`, - ); - } - expect(this.contractUnderTest.interface.hasFunction(fnSig), `did not find ${fnSig}`).to.be.true; } } diff --git a/test/utils/math/Math.test.js b/test/utils/math/Math.test.js index dda94f8d3..cb25db67c 100644 --- a/test/utils/math/Math.test.js +++ b/test/utils/math/Math.test.js @@ -3,10 +3,8 @@ const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { PANIC_CODES } = require('@nomicfoundation/hardhat-chai-matchers/panic'); +const { Rounding } = require('../../helpers/enums'); const { min, max } = require('../../helpers/math'); -const { - bigint: { Rounding }, -} = require('../../helpers/enums.js'); const RoundingDown = [Rounding.Floor, Rounding.Trunc]; const RoundingUp = [Rounding.Ceil, Rounding.Expand]; diff --git a/test/utils/math/SafeCast.test.js b/test/utils/math/SafeCast.test.js index a69e75c99..ecf55dc35 100644 --- a/test/utils/math/SafeCast.test.js +++ b/test/utils/math/SafeCast.test.js @@ -9,7 +9,7 @@ async function fixture() { return { mock }; } -contract('SafeCast', function () { +describe('SafeCast', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/utils/math/SignedMath.test.js b/test/utils/math/SignedMath.test.js index 51aa5d8fb..877f3b480 100644 --- a/test/utils/math/SignedMath.test.js +++ b/test/utils/math/SignedMath.test.js @@ -14,7 +14,7 @@ async function fixture() { return { mock }; } -contract('SignedMath', function () { +describe('SignedMath', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); diff --git a/test/utils/structs/Checkpoints.test.js b/test/utils/structs/Checkpoints.test.js index 2c15e082d..9458c486a 100644 --- a/test/utils/structs/Checkpoints.test.js +++ b/test/utils/structs/Checkpoints.test.js @@ -2,7 +2,7 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); -const { VALUE_SIZES } = require('../../../scripts/generate/templates/Checkpoints.opts.js'); +const { VALUE_SIZES } = require('../../../scripts/generate/templates/Checkpoints.opts'); const last = array => (array.length ? array[array.length - 1] : undefined); diff --git a/test/utils/types/Time.test.js b/test/utils/types/Time.test.js index 171a84526..3ab6fefa8 100644 --- a/test/utils/types/Time.test.js +++ b/test/utils/types/Time.test.js @@ -4,9 +4,7 @@ const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); const { product } = require('../../helpers/iterate'); const { max } = require('../../helpers/math'); -const { - bigint: { clock }, -} = require('../../helpers/time'); +const time = require('../../helpers/time'); const MAX_UINT32 = 1n << (32n - 1n); const MAX_UINT48 = 1n << (48n - 1n); @@ -43,18 +41,18 @@ async function fixture() { return { mock }; } -contract('Time', function () { +describe('Time', function () { beforeEach(async function () { Object.assign(this, await loadFixture(fixture)); }); describe('clocks', function () { it('timestamp', async function () { - expect(await this.mock.$timestamp()).to.equal(await clock.timestamp()); + expect(await this.mock.$timestamp()).to.equal(await time.clock.timestamp()); }); it('block number', async function () { - expect(await this.mock.$blockNumber()).to.equal(await clock.blocknumber()); + expect(await this.mock.$blockNumber()).to.equal(await time.clock.blocknumber()); }); }); @@ -92,7 +90,7 @@ contract('Time', function () { }); it('get & getFull', async function () { - const timepoint = await clock.timestamp().then(BigInt); + const timepoint = await time.clock.timestamp(); const valueBefore = 24194n; const valueAfter = 4214143n; @@ -110,7 +108,7 @@ contract('Time', function () { }); it('withUpdate', async function () { - const timepoint = await clock.timestamp().then(BigInt); + const timepoint = await time.clock.timestamp(); const valueBefore = 24194n; const valueAfter = 4214143n; const newvalueAfter = 94716n;