diff --git a/.env.example b/.env.example index 6fdec29..820950e 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,15 @@ REPORT_GAS=true ETHERSCAN_API_KEY= COIN_MARKETCAP_API_KEY= -OWNER_ADDRESS= +OWNER_ADDRESS=0x7bB3296d7c34fEB9A5CF25245346367fA1488Caf USDM_ADDRESS= PROXY_ADDRESS= +# Sepolia +ALCHEMY_SEPOLIA_API_KEY=EFbf2dOirtDeoDTQjyzgPweqEltdtCKP +SEPOLIA_PRIVATE_KEY=80b5a4e62ffe7b466308e31a9d27be78c4ca7e33ff0a92cb1d342fa9e12641ed + + # Goerli ALCHEMY_GOERLI_API_KEY= GOERLI_PRIVATE_KEY= @@ -12,3 +17,4 @@ GOERLI_PRIVATE_KEY= # # Mainnet # MAINNET_PRIVATE_KEY= # ALCHEMY_MAINNET_API_KEY= + diff --git a/contracts/USDM.sol b/contracts/USDX.sol similarity index 96% rename from contracts/USDM.sol rename to contracts/USDX.sol index 9b6d379..f948a3c 100644 --- a/contracts/USDM.sol +++ b/contracts/USDX.sol @@ -11,10 +11,11 @@ import {IERC20MetadataUpgradeable} from "@openzeppelin/contracts-upgradeable/tok import {IERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol"; /** - * @title Mountain Protocol USD Contract - * @custom:security-contact security@mountainprotocol.com + * @title X Protocol USD Contract + * @custom:security-contact alex@alexandros-securities.com + * @author Alexander Reed, X Financial Technologies */ -contract USDM is +contract USDX is IERC20MetadataUpgradeable, AccessControlUpgradeable, PausableUpgradeable, @@ -77,14 +78,14 @@ contract USDM is // ERC2612 Errors error ERC2612ExpiredDeadline(uint256 deadline, uint256 blockTimestamp); error ERC2612InvalidSignature(address owner, address spender); - // USDM Errors - error USDMInvalidMintReceiver(address receiver); - error USDMInvalidBurnSender(address sender); - error USDMInsufficientBurnBalance(address sender, uint256 shares, uint256 sharesNeeded); - error USDMInvalidRewardMultiplier(uint256 rewardMultiplier); - error USDMBlockedSender(address sender); - error USDMInvalidBlockedAccount(address account); - error USDMPausedTransfers(); + // USDX Errors + error USDXInvalidMintReceiver(address receiver); + error USDXInvalidBurnSender(address sender); + error USDXInsufficientBurnBalance(address sender, uint256 shares, uint256 sharesNeeded); + error USDXInvalidRewardMultiplier(uint256 rewardMultiplier); + error USDXBlockedSender(address sender); + error USDXInvalidBlockedAccount(address account); + error USDXPausedTransfers(); /** * @notice Initializes the contract. @@ -219,7 +220,7 @@ contract USDM is */ function _mint(address to, uint256 amount) private { if (to == address(0)) { - revert USDMInvalidMintReceiver(to); + revert USDXInvalidMintReceiver(to); } _beforeTokenTransfer(address(0), to, amount); @@ -262,7 +263,7 @@ contract USDM is */ function _burn(address account, uint256 amount) private { if (account == address(0)) { - revert USDMInvalidBurnSender(account); + revert USDXInvalidBurnSender(account); } _beforeTokenTransfer(account, address(0), amount); @@ -271,7 +272,7 @@ contract USDM is uint256 accountShares = sharesOf(account); if (accountShares < shares) { - revert USDMInsufficientBurnBalance(account, accountShares, shares); + revert USDXInsufficientBurnBalance(account, accountShares, shares); } unchecked { @@ -311,13 +312,13 @@ contract USDM is // Each blocklist check is an SLOAD, which is gas intensive. // We only block sender not receiver, so we don't tax every user if (isBlocked(from)) { - revert USDMBlockedSender(from); + revert USDXBlockedSender(from); } // Useful for scenarios such as preventing trades until the end of an evaluation // period, or having an emergency switch for freezing all token transfers in the // event of a large bug. if (paused()) { - revert USDMPausedTransfers(); + revert USDXPausedTransfers(); } } @@ -405,7 +406,7 @@ contract USDM is */ function _blockAccount(address account) private { if (isBlocked(account)) { - revert USDMInvalidBlockedAccount(account); + revert USDXInvalidBlockedAccount(account); } _blocklist[account] = true; @@ -418,7 +419,7 @@ contract USDM is */ function _unblockAccount(address account) private { if (!isBlocked(account)) { - revert USDMInvalidBlockedAccount(account); + revert USDXInvalidBlockedAccount(account); } _blocklist[account] = false; @@ -480,7 +481,7 @@ contract USDM is */ function _setRewardMultiplier(uint256 _rewardMultiplier) private { if (_rewardMultiplier < _BASE) { - revert USDMInvalidRewardMultiplier(_rewardMultiplier); + revert USDXInvalidRewardMultiplier(_rewardMultiplier); } rewardMultiplier = _rewardMultiplier; @@ -504,7 +505,7 @@ contract USDM is */ function addRewardMultiplier(uint256 _rewardMultiplierIncrement) external onlyRole(ORACLE_ROLE) { if (_rewardMultiplierIncrement == 0) { - revert USDMInvalidRewardMultiplier(_rewardMultiplierIncrement); + revert USDXInvalidRewardMultiplier(_rewardMultiplierIncrement); } _setRewardMultiplier(rewardMultiplier + _rewardMultiplierIncrement); diff --git a/contracts/wUSDM.sol b/contracts/wUSDX.sol similarity index 87% rename from contracts/wUSDM.sol rename to contracts/wUSDX.sol index c21e82d..9a7d81b 100644 --- a/contracts/wUSDM.sol +++ b/contracts/wUSDX.sol @@ -12,9 +12,9 @@ import {IERC20MetadataUpgradeable} from "@openzeppelin/contracts-upgradeable/tok import {IERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol"; /** - * @dev USDM Interface. + * @dev USDX Interface. */ -interface IUSDM is IERC20MetadataUpgradeable { +interface IUSDX is IERC20MetadataUpgradeable { /** * @dev Checks if the specified address is blocked. */ @@ -27,10 +27,10 @@ interface IUSDM is IERC20MetadataUpgradeable { } /** - * @title Wrapped Mountain Protocol USDM - * @custom:security-contact security@mountainprotocol.com + * @title Wrapped X Protocol USDX + * @custom:security-contact alex@alexandros-securities.com */ -contract wUSDM is +contract wUSDX is ERC4626Upgradeable, AccessControlUpgradeable, PausableUpgradeable, @@ -40,7 +40,7 @@ contract wUSDM is { using CountersUpgradeable for CountersUpgradeable.Counter; - IUSDM public USDM; + IUSDX public USDX; // Mapping of nonces per address mapping(address account => CountersUpgradeable.Counter counter) private _nonces; @@ -56,9 +56,9 @@ contract wUSDM is error ERC2612ExpiredDeadline(uint256 deadline, uint256 blockTimestamp); error ERC2612InvalidSignature(address owner, address spender); - // wUSDM Errors - error wUSDMBlockedSender(address sender); - error wUSDMPausedTransfers(); + // wUSDX Errors + error wUSDXBlockedSender(address sender); + error wUSDXPausedTransfers(); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { @@ -66,29 +66,29 @@ contract wUSDM is } /** - * @notice Initializes the ERC-4626 USDM Wrapper. - * @param _USDM The address of the USDM token to wrap. + * @notice Initializes the ERC-4626 USDX Wrapper. + * @param _USDX The address of the USDX token to wrap. * @param owner The owner address. */ - function initialize(IUSDM _USDM, address owner) external initializer { - USDM = _USDM; + function initialize(IUSDX _USDX, address owner) external initializer { + USDX = _USDX; - __ERC20_init("Wrapped Mountain Protocol USD", "wUSDM"); - __ERC4626_init(_USDM); + __ERC20_init("Wrapped X Protocol USD", "wUSDX"); + __ERC4626_init(_USDX); __AccessControl_init(); __Pausable_init(); __UUPSUpgradeable_init(); - __EIP712_init("Wrapped Mountain Protocol USD", "1"); + __EIP712_init("Wrapped X Protocol USD", "1"); _grantRole(DEFAULT_ADMIN_ROLE, owner); } /** * @notice We override paused to use the underlying paused state as well. - * @return Returns true if USDM or wUSDM is paused, and false otherwise. + * @return Returns true if USDX or wUSDX is paused, and false otherwise. */ function paused() public view override returns (bool) { - return USDM.paused() || super.paused(); + return USDX.paused() || super.paused(); } /** @@ -122,15 +122,15 @@ contract wUSDM is function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { // Each blocklist check is an SLOAD, which is gas intensive. // We only block sender not receiver, so we don't tax every user - if (USDM.isBlocked(from)) { - revert wUSDMBlockedSender(from); + if (USDX.isBlocked(from)) { + revert wUSDXBlockedSender(from); } // Useful for scenarios such as preventing trades until the end of an evaluation // period, or having an emergency switch for freezing all token transfers in the // event of a large bug. if (paused()) { - revert wUSDMPausedTransfers(); + revert wUSDXPausedTransfers(); } super._beforeTokenTransfer(from, to, amount); diff --git a/hardhat.config.ts b/hardhat.config.ts index 1990f25..c900a0c 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -17,6 +17,7 @@ const { OZ_PLATFORM_KEY, OZ_PLATFORM_SECRET, GOERLI_PRIVATE_KEY, + SEPOLIA_PRIVATE_KEY, } = process.env; const isTestEnv = NODE_ENV === 'test'; @@ -56,6 +57,10 @@ const config: HardhatUserConfig = { etherscan: ETHERSCAN_API_KEY ? etherscanConfig : {}, defaultNetwork: 'hardhat', networks: { + ganache: { + url: 'http://127.0.0.1:7545', + chainId: 5777, + }, goerli: { url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_GOERLI_API_KEY}`, chainId: 5, @@ -63,10 +68,10 @@ const config: HardhatUserConfig = { ...(GOERLI_PRIVATE_KEY ? { accounts: [GOERLI_PRIVATE_KEY] } : {}), }, sepolia: { - url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_SEPOLIA_API_KEY}`, + url: `https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_SEPOLIA_API_KEY}`, chainId: 11155111, // Only add account if the PK is provided - // ...(SEPOLIA_PRIVATE_KEY ? { accounts: [SEPOLIA_PRIVATE_KEY] } : {}), + ...(SEPOLIA_PRIVATE_KEY ? { accounts: [SEPOLIA_PRIVATE_KEY] } : {}), }, mainnet: { url: `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_MAINNET_API_KEY}`, diff --git a/package-lock.json b/package-lock.json index e831262..1c5c2a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,10 +19,11 @@ "@openzeppelin/test-helpers": "^0.5.16", "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", + "cross-env": "^7.0.3", "dotenv": "^16.0.3", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", - "hardhat": "^2.18.0", + "hardhat": "^2.22.13", "mocha": "^10.2.0", "prettier": "^2.8.8", "prettier-plugin-solidity": "^1.1.3", @@ -132,32 +133,6 @@ "node": ">=6.9.0" } }, - "node_modules/@chainsafe/as-sha256": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", - "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", - "dev": true - }, - "node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", - "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "node_modules/@chainsafe/ssz": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", - "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.4.2", - "case": "^1.6.3" - } - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -1476,289 +1451,129 @@ "node": ">= 8" } }, - "node_modules/@nomicfoundation/ethereumjs-block": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz", - "integrity": "sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==", + "node_modules/@nomicfoundation/edr": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.6.3.tgz", + "integrity": "sha512-hThe5ORR75WFYTXKL0K2AyLDxkTMrG+VQ1yL9BhQYsuh3OIH+3yNDxMz2LjfvrpOrMmJ4kk5NKdFewpqDojjXQ==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1" + "@nomicfoundation/edr-darwin-arm64": "0.6.3", + "@nomicfoundation/edr-darwin-x64": "0.6.3", + "@nomicfoundation/edr-linux-arm64-gnu": "0.6.3", + "@nomicfoundation/edr-linux-arm64-musl": "0.6.3", + "@nomicfoundation/edr-linux-x64-gnu": "0.6.3", + "@nomicfoundation/edr-linux-x64-musl": "0.6.3", + "@nomicfoundation/edr-win32-x64-msvc": "0.6.3" }, "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-block/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "node_modules/@nomicfoundation/edr-darwin-arm64": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.6.3.tgz", + "integrity": "sha512-hqtI7tYDqKG5PDmZ//Z65EH5cgH8VL/SAAu50rpHP7WAVfJWkOCcYbecywwF6nhHdonJbRTDGAeG1/+VOy6zew==", "dev": true, - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz", - "integrity": "sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==", + "node_modules/@nomicfoundation/edr-darwin-x64": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.6.3.tgz", + "integrity": "sha512-4fGi79/lyOlRUORhCYsYb3sWqRHuHT7qqzyZfZuNOn8llaxmT1k36xNmvpyg37R8SzjnhT/DzoukSJrs23Ip9Q==", "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-ethash": "3.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "level": "^8.0.0", - "lru-cache": "^5.1.1", - "memory-level": "^1.0.0" - }, "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.6.3.tgz", + "integrity": "sha512-yFFTvGFMhfAvQ1Z2itUh1jpoUA+mVROyVELcaxjIq8fyg602lQmbS+NXkhQ+oaeDgJ+06mSENrHBg4fcfRf9cw==", "dev": true, - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-common": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz", - "integrity": "sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==", + "node_modules/@nomicfoundation/edr-linux-arm64-musl": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.6.3.tgz", + "integrity": "sha512-pOKmd0Fa3a6BHg5qbjbl/jMRELVi9oazbfiuU7Bvgn/dpTK+ID3jwT0SXiuC2zxjmPByWgXL6G9XRf5BPAM2rQ==", "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-util": "9.0.2", - "crc-32": "^1.2.0" + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz", - "integrity": "sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==", + "node_modules/@nomicfoundation/edr-linux-x64-gnu": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.6.3.tgz", + "integrity": "sha512-3AUferhkLIXtLV63w5GjpHttzdxZ36i656XMy+pkBZbbiqnzIVeKWg6DJv1A94fQY16gB4gqj9CLq4CWvbNN6w==", "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "bigint-crypto-utils": "^3.0.23", - "ethereum-cryptography": "0.1.3" - }, "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-ethash/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "node_modules/@nomicfoundation/edr-linux-x64-musl": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.6.3.tgz", + "integrity": "sha512-fr6bD872WIBXe9YnTDi0CzYepMcYRgSnkVqn0yK4wRnIvKrloWhxXNVY45GVIl51aNZguBnvoA4WEt6HIazs3A==", "dev": true, - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "engines": { + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-evm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz", - "integrity": "sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==", + "node_modules/@nomicfoundation/edr-win32-x64-msvc": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.6.3.tgz", + "integrity": "sha512-sn34MvN1ajw2Oq1+Drpxej78Z0HfIzI4p4WlolupAV9dOZKzp2JAIQeLVfZpjIFbF3zuyxLPP4dUBrQoFPEqhA==", "dev": true, - "dependencies": { - "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" - }, "engines": { - "node": ">=14" + "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-evm/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "node_modules/@nomicfoundation/ethereumjs-common": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", + "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", "dev": true, "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "@nomicfoundation/ethereumjs-util": "9.0.4" } }, "node_modules/@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz", - "integrity": "sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", + "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", "dev": true, "bin": { - "rlp": "bin/rlp" + "rlp": "bin/rlp.cjs" }, "engines": { - "node": ">=14" - } - }, - "node_modules/@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz", - "integrity": "sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1", - "js-sdsl": "^4.1.4" - } - }, - "node_modules/@nomicfoundation/ethereumjs-statemanager/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "node_modules/@nomicfoundation/ethereumjs-trie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz", - "integrity": "sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@types/readable-stream": "^2.3.13", - "ethereum-cryptography": "0.1.3", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@nomicfoundation/ethereumjs-trie/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-tx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz", - "integrity": "sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", + "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", "dev": true, "dependencies": { - "@chainsafe/ssz": "^0.9.2", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } } }, "node_modules/@nomicfoundation/ethereumjs-tx/node_modules/ethereum-cryptography": { @@ -1785,86 +1600,27 @@ } }, "node_modules/@nomicfoundation/ethereumjs-util": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz", - "integrity": "sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", + "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", "dev": true, "dependencies": { - "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" - } - }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", - "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/ssz": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", - "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.5.0" - } - }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "node_modules/@nomicfoundation/ethereumjs-vm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz", - "integrity": "sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" + "node": ">=18" }, - "engines": { - "node": ">=14" + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } } }, - "node_modules/@nomicfoundation/ethereumjs-vm/node_modules/ethereum-cryptography": { + "node_modules/@nomicfoundation/ethereumjs-util/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", @@ -3388,22 +3144,6 @@ "dev": true, "peer": true }, - "node_modules/@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - } - }, - "node_modules/@types/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -3747,24 +3487,6 @@ "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", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "catering": "^2.1.0", - "is-buffer": "^2.0.5", - "level-supports": "^4.0.0", - "level-transcoder": "^1.0.1", - "module-error": "^1.0.1", - "queue-microtask": "^1.2.3" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -3908,6 +3630,15 @@ "node": ">=0.4.2" } }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -4243,15 +3974,6 @@ "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", - "integrity": "sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==", - "dev": true, - "engines": { - "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", @@ -4333,6 +4055,110 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/boxen/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/boxen/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -4361,18 +4187,6 @@ "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", "dev": true }, - "node_modules/browser-level": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", - "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", - "dev": true, - "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.1", - "module-error": "^1.0.2", - "run-parallel-limit": "^1.1.0" - } - }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -4575,30 +4389,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/case": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, - "node_modules/catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/cbor": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", @@ -4846,23 +4642,6 @@ "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", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.0", - "module-error": "^1.0.1", - "napi-macros": "^2.2.2", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -4872,6 +4651,18 @@ "node": ">=6" } }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-table3": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", @@ -5063,10 +4854,13 @@ } }, "node_modules/commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", - "dev": true + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } }, "node_modules/compare-versions": { "version": "5.0.3", @@ -5269,6 +5063,24 @@ "dev": true, "peer": true }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, "node_modules/cross-fetch": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.6.tgz", @@ -7772,12 +7584,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -8117,23 +7923,17 @@ } }, "node_modules/hardhat": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.18.1.tgz", - "integrity": "sha512-b55rW7Ka+fvJeg6oWuBTXoYQEUurevCCankjGNTwczwD3GnkhV9GEei7KUT+9IKmWx3lC+zyxlFxeDbg0gUoHw==", + "version": "2.22.13", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.13.tgz", + "integrity": "sha512-psVJX4FSXDpSXwsU8OcKTJN04pQEj9cFBMX5OPko+OFwbIoiOpvRmafa954/UaA1934npTj8sV3gaTSdx9bPbA==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.1.2", "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@nomicfoundation/ethereumjs-vm": "7.0.2", + "@nomicfoundation/edr": "^0.6.3", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "@types/bn.js": "^5.1.0", @@ -8141,8 +7941,9 @@ "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", "chalk": "^2.4.2", - "chokidar": "^3.4.0", + "chokidar": "^4.0.0", "ci-info": "^2.0.0", "debug": "^4.1.1", "enquirer": "^2.3.0", @@ -8155,6 +7956,7 @@ "glob": "7.2.0", "immutable": "^4.0.0-rc.12", "io-ts": "1.10.4", + "json-stream-stringify": "^3.1.4", "keccak": "^3.0.2", "lodash": "^4.17.11", "mnemonist": "^0.38.0", @@ -8163,7 +7965,7 @@ "raw-body": "^2.4.1", "resolve": "1.17.0", "semver": "^6.3.0", - "solc": "0.7.3", + "solc": "0.8.26", "source-map-support": "^0.5.13", "stacktrace-parser": "^0.1.10", "tsort": "0.0.1", @@ -8202,6 +8004,34 @@ "hardhat": "^2.0.2" } }, + "node_modules/hardhat/node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -8770,6 +8600,7 @@ "url": "https://feross.org/support" } ], + "peer": true, "engines": { "node": ">=4" } @@ -9159,6 +8990,15 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stream-stringify": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", + "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", + "dev": true, + "engines": { + "node": ">=7.10.1" + } + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -9252,45 +9092,6 @@ "node": ">=0.10.0" } }, - "node_modules/level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", - "dev": true, - "dependencies": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/level" - } - }, - "node_modules/level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -9525,15 +9326,6 @@ "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "dev": true }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -9548,15 +9340,6 @@ "dev": true, "peer": true }, - "node_modules/mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", - "dev": true, - "engines": { - "node": ">=8.9.0" - } - }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -9577,20 +9360,6 @@ "node": ">= 0.6" } }, - "node_modules/memory-level": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", - "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", - "dev": true, - "dependencies": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -9962,15 +9731,6 @@ "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", - "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -10092,12 +9852,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", - "dev": true - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -11445,42 +11199,19 @@ "node_modules/rlp": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "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" - } - ], + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dev": true, "dependencies": { - "queue-microtask": "^1.2.2" + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" } }, - "node_modules/run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -11500,12 +11231,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -12005,54 +11730,30 @@ } }, "node_modules/solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", + "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", "dev": true, "dependencies": { "command-exists": "^1.2.8", - "commander": "3.0.2", + "commander": "^8.1.0", "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", "js-sha3": "0.8.0", "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", "semver": "^5.5.0", "tmp": "0.0.33" }, "bin": { - "solcjs": "solcjs" + "solcjs": "solc.js" }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/solc/node_modules/fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", - "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/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": ">=10.0.0" } }, "node_modules/solc/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "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" @@ -14173,6 +13874,18 @@ "node": ">=4" } }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/window-size": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", @@ -14542,32 +14255,6 @@ "regenerator-runtime": "^0.13.11" } }, - "@chainsafe/as-sha256": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", - "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", - "dev": true - }, - "@chainsafe/persistent-merkle-tree": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", - "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "@chainsafe/ssz": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", - "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.4.2", - "case": "^1.6.3" - } - }, "@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -15472,334 +15159,90 @@ "fastq": "^1.6.0" } }, - "@nomicfoundation/ethereumjs-block": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz", - "integrity": "sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==", + "@nomicfoundation/edr": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.6.3.tgz", + "integrity": "sha512-hThe5ORR75WFYTXKL0K2AyLDxkTMrG+VQ1yL9BhQYsuh3OIH+3yNDxMz2LjfvrpOrMmJ4kk5NKdFewpqDojjXQ==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } + "@nomicfoundation/edr-darwin-arm64": "0.6.3", + "@nomicfoundation/edr-darwin-x64": "0.6.3", + "@nomicfoundation/edr-linux-arm64-gnu": "0.6.3", + "@nomicfoundation/edr-linux-arm64-musl": "0.6.3", + "@nomicfoundation/edr-linux-x64-gnu": "0.6.3", + "@nomicfoundation/edr-linux-x64-musl": "0.6.3", + "@nomicfoundation/edr-win32-x64-msvc": "0.6.3" } }, - "@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz", - "integrity": "sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-ethash": "3.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "level": "^8.0.0", - "lru-cache": "^5.1.1", - "memory-level": "^1.0.0" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } - } + "@nomicfoundation/edr-darwin-arm64": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.6.3.tgz", + "integrity": "sha512-hqtI7tYDqKG5PDmZ//Z65EH5cgH8VL/SAAu50rpHP7WAVfJWkOCcYbecywwF6nhHdonJbRTDGAeG1/+VOy6zew==", + "dev": true }, - "@nomicfoundation/ethereumjs-common": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz", - "integrity": "sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-util": "9.0.2", - "crc-32": "^1.2.0" - } + "@nomicfoundation/edr-darwin-x64": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.6.3.tgz", + "integrity": "sha512-4fGi79/lyOlRUORhCYsYb3sWqRHuHT7qqzyZfZuNOn8llaxmT1k36xNmvpyg37R8SzjnhT/DzoukSJrs23Ip9Q==", + "dev": true }, - "@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz", - "integrity": "sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "bigint-crypto-utils": "^3.0.23", - "ethereum-cryptography": "0.1.3" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } - } + "@nomicfoundation/edr-linux-arm64-gnu": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.6.3.tgz", + "integrity": "sha512-yFFTvGFMhfAvQ1Z2itUh1jpoUA+mVROyVELcaxjIq8fyg602lQmbS+NXkhQ+oaeDgJ+06mSENrHBg4fcfRf9cw==", + "dev": true }, - "@nomicfoundation/ethereumjs-evm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz", - "integrity": "sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==", - "dev": true, - "requires": { - "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } - } + "@nomicfoundation/edr-linux-arm64-musl": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.6.3.tgz", + "integrity": "sha512-pOKmd0Fa3a6BHg5qbjbl/jMRELVi9oazbfiuU7Bvgn/dpTK+ID3jwT0SXiuC2zxjmPByWgXL6G9XRf5BPAM2rQ==", + "dev": true }, - "@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz", - "integrity": "sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==", + "@nomicfoundation/edr-linux-x64-gnu": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.6.3.tgz", + "integrity": "sha512-3AUferhkLIXtLV63w5GjpHttzdxZ36i656XMy+pkBZbbiqnzIVeKWg6DJv1A94fQY16gB4gqj9CLq4CWvbNN6w==", "dev": true }, - "@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz", - "integrity": "sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1", - "js-sdsl": "^4.1.4" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } - } + "@nomicfoundation/edr-linux-x64-musl": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.6.3.tgz", + "integrity": "sha512-fr6bD872WIBXe9YnTDi0CzYepMcYRgSnkVqn0yK4wRnIvKrloWhxXNVY45GVIl51aNZguBnvoA4WEt6HIazs3A==", + "dev": true }, - "@nomicfoundation/ethereumjs-trie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz", - "integrity": "sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@types/readable-stream": "^2.3.13", - "ethereum-cryptography": "0.1.3", - "readable-stream": "^3.6.0" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } - } + "@nomicfoundation/edr-win32-x64-msvc": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.6.3.tgz", + "integrity": "sha512-sn34MvN1ajw2Oq1+Drpxej78Z0HfIzI4p4WlolupAV9dOZKzp2JAIQeLVfZpjIFbF3zuyxLPP4dUBrQoFPEqhA==", + "dev": true }, - "@nomicfoundation/ethereumjs-tx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz", - "integrity": "sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==", + "@nomicfoundation/ethereumjs-common": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", + "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", "dev": true, "requires": { - "@chainsafe/ssz": "^0.9.2", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "ethereum-cryptography": "0.1.3" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } + "@nomicfoundation/ethereumjs-util": "9.0.4" } }, - "@nomicfoundation/ethereumjs-util": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz", - "integrity": "sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==", + "@nomicfoundation/ethereumjs-rlp": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", + "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", + "dev": true + }, + "@nomicfoundation/ethereumjs-tx": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", + "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", "dev": true, "requires": { - "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "ethereum-cryptography": "0.1.3" }, "dependencies": { - "@chainsafe/persistent-merkle-tree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", - "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "@chainsafe/ssz": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", - "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.5.0" - } - }, "ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -15825,25 +15268,14 @@ } } }, - "@nomicfoundation/ethereumjs-vm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz", - "integrity": "sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==", + "@nomicfoundation/ethereumjs-util": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", + "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "ethereum-cryptography": "0.1.3" }, "dependencies": { "ethereum-cryptography": { @@ -17067,24 +16499,6 @@ "dev": true, "peer": true }, - "@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "dev": true, - "requires": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "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 - } - } - }, "@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -17312,21 +16726,6 @@ "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", "dev": true }, - "abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", - "dev": true, - "requires": { - "buffer": "^6.0.3", - "catering": "^2.1.0", - "is-buffer": "^2.0.5", - "level-supports": "^4.0.0", - "level-transcoder": "^1.0.1", - "module-error": "^1.0.1", - "queue-microtask": "^1.2.3" - } - }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -17439,6 +16838,15 @@ "dev": true, "optional": true }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "requires": { + "string-width": "^4.1.0" + } + }, "ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -17695,12 +17103,6 @@ "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", "dev": true }, - "bigint-crypto-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", - "integrity": "sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==", - "dev": true - }, "bignumber.js": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", @@ -17774,6 +17176,79 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -17799,18 +17274,6 @@ "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", "dev": true }, - "browser-level": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", - "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", - "dev": true, - "requires": { - "abstract-level": "^1.0.2", - "catering": "^2.1.1", - "module-error": "^1.0.2", - "run-parallel-limit": "^1.1.0" - } - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -17967,24 +17430,12 @@ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, - "case": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, - "catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "dev": true - }, "cbor": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", @@ -18176,25 +17627,18 @@ "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", "dev": true }, - "classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", - "dev": true, - "requires": { - "abstract-level": "^1.0.2", - "catering": "^2.1.0", - "module-error": "^1.0.1", - "napi-macros": "^2.2.2", - "node-gyp-build": "^4.3.0" - } - }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, "cli-table3": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", @@ -18349,9 +17793,9 @@ } }, "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", "dev": true }, "compare-versions": { @@ -18530,6 +17974,15 @@ "dev": true, "peer": true }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, "cross-fetch": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.6.tgz", @@ -20526,12 +19979,6 @@ "functions-have-names": "^1.2.2" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -20780,23 +20227,17 @@ } }, "hardhat": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.18.1.tgz", - "integrity": "sha512-b55rW7Ka+fvJeg6oWuBTXoYQEUurevCCankjGNTwczwD3GnkhV9GEei7KUT+9IKmWx3lC+zyxlFxeDbg0gUoHw==", + "version": "2.22.13", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.13.tgz", + "integrity": "sha512-psVJX4FSXDpSXwsU8OcKTJN04pQEj9cFBMX5OPko+OFwbIoiOpvRmafa954/UaA1934npTj8sV3gaTSdx9bPbA==", "dev": true, "requires": { "@ethersproject/abi": "^5.1.2", "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@nomicfoundation/ethereumjs-vm": "7.0.2", + "@nomicfoundation/edr": "^0.6.3", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "@types/bn.js": "^5.1.0", @@ -20804,8 +20245,9 @@ "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", "chalk": "^2.4.2", - "chokidar": "^3.4.0", + "chokidar": "^4.0.0", "ci-info": "^2.0.0", "debug": "^4.1.1", "enquirer": "^2.3.0", @@ -20818,6 +20260,7 @@ "glob": "7.2.0", "immutable": "^4.0.0-rc.12", "io-ts": "1.10.4", + "json-stream-stringify": "^3.1.4", "keccak": "^3.0.2", "lodash": "^4.17.11", "mnemonist": "^0.38.0", @@ -20826,13 +20269,30 @@ "raw-body": "^2.4.1", "resolve": "1.17.0", "semver": "^6.3.0", - "solc": "0.7.3", + "solc": "0.8.26", "source-map-support": "^0.5.13", "stacktrace-parser": "^0.1.10", "tsort": "0.0.1", "undici": "^5.14.0", "uuid": "^8.3.2", "ws": "^7.4.6" + }, + "dependencies": { + "chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "requires": { + "readdirp": "^4.0.1" + } + }, + "readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true + } } }, "hardhat-gas-reporter": { @@ -21270,7 +20730,8 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true + "dev": true, + "peer": true }, "is-callable": { "version": "1.2.7", @@ -21562,6 +21023,12 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "json-stream-stringify": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", + "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -21639,32 +21106,6 @@ "invert-kv": "^1.0.0" } }, - "level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", - "dev": true, - "requires": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" - } - }, - "level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", - "dev": true - }, - "level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", - "dev": true, - "requires": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" - } - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -21855,15 +21296,6 @@ "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "dev": true }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -21878,12 +21310,6 @@ "dev": true, "peer": true }, - "mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", - "dev": true - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -21901,17 +21327,6 @@ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, - "memory-level": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", - "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", - "dev": true, - "requires": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" - } - }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -22186,12 +21601,6 @@ "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", "dev": true }, - "module-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", - "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -22280,12 +21689,6 @@ "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, - "napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -23326,21 +22729,6 @@ "queue-microtask": "^1.2.2" } }, - "run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -23741,48 +23129,24 @@ } }, "solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", + "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", "dev": true, "requires": { "command-exists": "^1.2.8", - "commander": "3.0.2", + "commander": "^8.1.0", "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", "js-sha3": "0.8.0", "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", "semver": "^5.5.0", "tmp": "0.0.33" }, "dependencies": { - "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, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true } } @@ -25503,6 +24867,15 @@ } } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "window-size": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", diff --git a/package.json b/package.json index 75ce919..56449aa 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "tokens", "version": "1.0.0", - "description": "Mountain Protocol Smart Contracts", + "description": "X Protocol Smart Contracts", "main": "index.js", "private": true, "scripts": { - "test": "NODE_ENV=test hardhat test", - "coverage": "NODE_ENV=test hardhat coverage", + "test": "cross-env NODE_ENV=test hardhat test", + "coverage": "cross-env NODE_ENV=test hardhat coverage", "lint": "npm run lint:js && npm run lint:sol", "lint:fix": "npm run lint:js:fix && npm run lint:sol:fix", "lint:js": "prettier --loglevel warn --ignore-path .gitignore '**/*.{js,ts}' --check && eslint --ignore-path .gitignore .", @@ -32,10 +32,11 @@ "@openzeppelin/test-helpers": "^0.5.16", "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", + "cross-env": "^7.0.3", "dotenv": "^16.0.3", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", - "hardhat": "^2.18.0", + "hardhat": "^2.22.13", "mocha": "^10.2.0", "prettier": "^2.8.8", "prettier-plugin-solidity": "^1.1.3", diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 9636631..ceff18f 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -3,13 +3,13 @@ import dotenv from 'dotenv'; dotenv.config(); -const { OWNER_ADDRESS, USDM_ADDRESS, PROXY_ADDRESS } = process.env; -// const contractName = 'USDM'; -const contractName = 'wUSDM'; -// const initializeArgs = ['Mountain Protocol USD', 'USDM', OWNER_ADDRESS]; -const initializerArgs = [USDM_ADDRESS, OWNER_ADDRESS]; -// const salt = '1337'; -const salt = '1337w'; +const { OWNER_ADDRESS, USDX_ADDRESS, PROXY_ADDRESS } = process.env; +const contractName = 'USDX'; +// const contractName = 'wUSDM'; +const initializerArgs = ['X Protocol USD', 'USDX', OWNER_ADDRESS]; +// const initializerArgs = [USDM_ADDRESS, OWNER_ADDRESS]; +const salt = '1337'; +// const salt = '1337w'; // Deploy with terminal // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/test/USDM.ts b/test/USDX.ts similarity index 88% rename from test/USDM.ts rename to test/USDX.ts index a410b31..f443d43 100644 --- a/test/USDM.ts +++ b/test/USDX.ts @@ -18,20 +18,20 @@ const roles = { DEFAULT_ADMIN_ROLE: ethers.constants.HashZero, }; -describe('USDM', () => { - const name = 'Mountain Protocol USD'; - const symbol = 'USDM'; +describe('USDX', () => { + const name = 'X Protocol USD'; + const symbol = 'USDX'; const totalShares = parseUnits('1337'); // We define a fixture to reuse the same setup in every test. // We use loadFixture to run this setup once, snapshot that state, // and reset Hardhat Network to that snapshopt in every test. - const deployUSDMFixture = async () => { + const deployUSDXFixture = async () => { // Contracts are deployed using the first signer/account by default const [owner, acc1, acc2] = await ethers.getSigners(); - const USDM = await ethers.getContractFactory('USDM'); - const contract = await upgrades.deployProxy(USDM, [name, symbol, owner.address], { + const USDX = await ethers.getContractFactory('USDX'); + const contract = await upgrades.deployProxy(USDX, [name, symbol, owner.address], { initializer: 'initialize', }); @@ -44,62 +44,62 @@ describe('USDM', () => { describe('Deployment', () => { it('has a name', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); expect(await contract.name()).to.equal(name); }); it('has a symbol', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); expect(await contract.symbol()).to.equal(symbol); }); it('has 18 decimals', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); expect(await contract.decimals()).to.be.equal(18); }); it('grants admin role to the address passed to the initializer', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); expect(await contract.hasRole(await contract.DEFAULT_ADMIN_ROLE(), owner.address)).to.equal(true); }); it('returns the total shares', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); expect(await contract.totalShares()).to.equal(totalShares); }); it('returns the total supply', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); // Reward multiplier is not set so totalShares === totalSupply expect(await contract.totalSupply()).to.equal(totalShares); }); it('assigns the total shares to the owner', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); expect(await contract.sharesOf(owner.address)).to.equal(totalShares); }); it('assigns the balance to the the owner', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); expect(await contract.balanceOf(owner.address)).to.equal(totalShares); }); it('sets reward multiplier to 100%', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); expect(await contract.rewardMultiplier()).to.equal(parseUnits('1')); // 1 equals to 100% }); it('fails if initialize is called again after initialization', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await expect(contract.initialize(name, symbol, owner.address)).to.be.revertedWith( 'Initializable: contract is already initialized', @@ -109,7 +109,7 @@ describe('USDM', () => { describe('Transfer', () => { it('transfers tokens from one account to another', async () => { - const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDXFixture); const amount = parseUnits('10'); await expect(contract.transfer(acc1.address, amount)).to.changeTokenBalances( @@ -128,7 +128,7 @@ describe('USDM', () => { }); it('reverts when transfer amount exceeds balance', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const balance = await contract.balanceOf(owner.address); @@ -138,7 +138,7 @@ describe('USDM', () => { }); it('emits a transfer events', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const to = acc1.address; const amount = parseUnits('1'); @@ -147,7 +147,7 @@ describe('USDM', () => { }); it('reverts when transfer from the zero address', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const signerZero = await ethers.getImpersonatedSigner(AddressZero); // Fund the zero address to pay for the transaction @@ -162,7 +162,7 @@ describe('USDM', () => { }); it('reverts when transfer to the zero address', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); const amount = parseUnits('1'); @@ -172,7 +172,7 @@ describe('USDM', () => { }); it('takes tokens amount as argument but transfers shares', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = parseUnits('100'); const rewardMultiplier = parseUnits('1.0001'); // 1bps const sharesBeforeTransfer = await contract.sharesOf(owner.address); @@ -189,7 +189,7 @@ describe('USDM', () => { describe('Access Control', () => { it('does not mint without minter role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await expect(contract.connect(acc1).mint(acc1.address, 1000)).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.MINTER}`, @@ -197,7 +197,7 @@ describe('USDM', () => { }); it('mints with minter role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, acc1.address); @@ -207,7 +207,7 @@ describe('USDM', () => { }); it('does not burn without burner role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await expect(contract.connect(acc1).burn(acc1.address, 1000)).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.BURNER}`, @@ -215,7 +215,7 @@ describe('USDM', () => { }); it('burns with burner role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BURNER, owner.address); @@ -225,7 +225,7 @@ describe('USDM', () => { }); it('does not set the reward multiplier without admin role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await expect(contract.connect(acc1).setRewardMultiplier(1)).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.DEFAULT_ADMIN_ROLE}`, @@ -233,7 +233,7 @@ describe('USDM', () => { }); it('updates the reward multiplier with oracle role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); @@ -243,7 +243,7 @@ describe('USDM', () => { }); it('does not add a reward multiplier without oracle role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await expect(contract.addRewardMultiplier(1)).to.be.revertedWith( `AccessControl: account ${owner.address.toLowerCase()} is missing role ${roles.ORACLE}`, @@ -251,7 +251,7 @@ describe('USDM', () => { }); it('adds a reward multiplier with oracle role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); @@ -261,7 +261,7 @@ describe('USDM', () => { }); it('does not block without blocklist role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await expect(contract.blockAccounts([owner.address])).to.be.revertedWith( `AccessControl: account ${owner.address.toLowerCase()} is missing role ${roles.BLOCKLIST}`, @@ -269,7 +269,7 @@ describe('USDM', () => { }); it('blocks with blocklist role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); @@ -279,7 +279,7 @@ describe('USDM', () => { }); it('does not unblock without blocklist role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await expect(contract.unblockAccounts([owner.address])).to.be.revertedWith( `AccessControl: account ${owner.address.toLowerCase()} is missing role ${roles.BLOCKLIST}`, @@ -287,7 +287,7 @@ describe('USDM', () => { }); it('unblocks with blocklist role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); @@ -297,7 +297,7 @@ describe('USDM', () => { }); it('pauses when pause role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.PAUSE, owner.address); @@ -307,7 +307,7 @@ describe('USDM', () => { }); it('does not pause without pause role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await expect(contract.connect(acc1).pause()).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.PAUSE}`, @@ -315,7 +315,7 @@ describe('USDM', () => { }); it('unpauses when pause role', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.PAUSE, owner.address); @@ -327,7 +327,7 @@ describe('USDM', () => { }); it('does not unpause without pause role', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.PAUSE, owner.address); await contract.pause(); @@ -338,7 +338,7 @@ describe('USDM', () => { }); it('does not upgrade without upgrade role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await expect(contract.connect(acc1).upgradeTo(AddressZero)).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.UPGRADE}`, @@ -346,7 +346,7 @@ describe('USDM', () => { }); it('upgrades with upgrade role', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.UPGRADE, acc1.address); @@ -358,7 +358,7 @@ describe('USDM', () => { describe('Blocklist', () => { it('blocks an account', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address]); @@ -367,7 +367,7 @@ describe('USDM', () => { }); it('blocks multiples accounts', async () => { - const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address, acc2.address]); @@ -378,7 +378,7 @@ describe('USDM', () => { }); it('unblocks an account', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address]); @@ -388,7 +388,7 @@ describe('USDM', () => { }); it('unblocks multiples accounts', async () => { - const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address, acc2.address]); @@ -400,72 +400,72 @@ describe('USDM', () => { }); it('reverts when transfering from a blocked account', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([owner.address]); await expect(contract.transfer(acc1.address, 1)) - .to.be.revertedWithCustomError(contract, 'USDMBlockedSender') + .to.be.revertedWithCustomError(contract, 'USDXBlockedSender') .withArgs(owner.address); }); it('allows transfers to blocked accounts', async () => { // We only block sender not receiver, so we don't tax every user - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address]); - await expect(contract.transfer(acc1.address, 1)).to.not.be.revertedWithCustomError(contract, 'USDMBlockedSender'); + await expect(contract.transfer(acc1.address, 1)).to.not.be.revertedWithCustomError(contract, 'USDXBlockedSender'); }); it('reverts when blocking an account already blocked', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address]); await expect(contract.blockAccounts([acc1.address])) - .to.be.revertedWithCustomError(contract, 'USDMInvalidBlockedAccount') + .to.be.revertedWithCustomError(contract, 'USDXInvalidBlockedAccount') .withArgs(acc1.address); }); it('reverts when unblocking an account not blocked', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await expect(contract.unblockAccounts([owner.address])) - .to.be.revertedWithCustomError(contract, 'USDMInvalidBlockedAccount') + .to.be.revertedWithCustomError(contract, 'USDXInvalidBlockedAccount') .withArgs(owner.address); }); it('reverts when blocking a repeated accounts', async () => { - const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await expect(contract.blockAccounts([acc1.address, acc2.address, acc2.address])) - .to.be.revertedWithCustomError(contract, 'USDMInvalidBlockedAccount') + .to.be.revertedWithCustomError(contract, 'USDXInvalidBlockedAccount') .withArgs(acc2.address); }); it('reverts when unblocking repeated accounts', async () => { - const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1, acc2 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BLOCKLIST, owner.address); await contract.blockAccounts([acc1.address, acc2.address]); await expect(contract.unblockAccounts([acc1.address, acc2.address, acc2.address])) - .to.be.revertedWithCustomError(contract, 'USDMInvalidBlockedAccount') + .to.be.revertedWithCustomError(contract, 'USDXInvalidBlockedAccount') .withArgs(acc2.address); }); }); describe('Pause', () => { it('allows minting when unpaused', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); await contract.grantRole(roles.MINTER, owner.address); @@ -475,12 +475,12 @@ describe('USDM', () => { await expect(contract.mint(acc1.address, tokensAmount)).to.not.be.revertedWithCustomError( contract, - 'USDMPausedTransfers', + 'USDXPausedTransfers', ); }); it('does not allow minting when paused', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); await contract.grantRole(roles.MINTER, owner.address); @@ -489,12 +489,12 @@ describe('USDM', () => { await expect(contract.mint(owner.address, tokensAmount)).to.be.revertedWithCustomError( contract, - 'USDMPausedTransfers', + 'USDXPausedTransfers', ); }); it('allows burning when unpaused', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); await contract.grantRole(roles.BURNER, owner.address); @@ -504,12 +504,12 @@ describe('USDM', () => { await expect(contract.burn(owner.address, tokensAmount)).to.not.be.revertedWithCustomError( contract, - 'USDMPausedTransfers', + 'USDXPausedTransfers', ); }); it('does not allow burning when paused', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); await contract.grantRole(roles.BURNER, owner.address); @@ -518,12 +518,12 @@ describe('USDM', () => { await expect(contract.burn(owner.address, tokensAmount)).to.be.revertedWithCustomError( contract, - 'USDMPausedTransfers', + 'USDXPausedTransfers', ); }); it('allows transfers when unpaused', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); await contract.grantRole(roles.PAUSE, owner.address); @@ -532,12 +532,12 @@ describe('USDM', () => { await expect(contract.transfer(acc1.address, tokensAmount)).to.not.be.revertedWithCustomError( contract, - 'USDMPausedTransfers', + 'USDXPausedTransfers', ); }); it('does not allow transfers when paused', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); await contract.grantRole(roles.PAUSE, owner.address); @@ -545,7 +545,7 @@ describe('USDM', () => { await expect(contract.transfer(acc1.address, tokensAmount)).to.be.revertedWithCustomError( contract, - 'USDMPausedTransfers', + 'USDXPausedTransfers', ); }); }); @@ -559,17 +559,17 @@ describe('USDM', () => { }; it('does not support adding a reward multiplier lower than zero', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); await expect(contract.addRewardMultiplier(0)) - .to.be.revertedWithCustomError(contract, 'USDMInvalidRewardMultiplier') + .to.be.revertedWithCustomError(contract, 'USDXInvalidRewardMultiplier') .withArgs(0); }); it('adds a reward multiplier and emits event with the new value', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); @@ -585,7 +585,7 @@ describe('USDM', () => { }); it('sets the reward multiplier', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); @@ -599,19 +599,19 @@ describe('USDM', () => { }); it('does not support setting a reward multiplier below one', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); const rewardMultiplier = parseUnits('0.99999'); // 1 equals to 100% await expect(contract.setRewardMultiplier(rewardMultiplier)) - .to.be.revertedWithCustomError(contract, 'USDMInvalidRewardMultiplier') + .to.be.revertedWithCustomError(contract, 'USDXInvalidRewardMultiplier') .withArgs(rewardMultiplier); }); it('updates the total supply according to the new reward multiplier', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const rewardMultiplier = parseUnits('1.0001'); await contract.grantRole(roles.ORACLE, owner.address); @@ -626,13 +626,13 @@ describe('USDM', () => { }); it('mints by tokens amount not by shares', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const rewardMultiplierIncrement = parseUnits('0.0004'); // 4bps await contract.grantRole(roles.ORACLE, owner.address); await contract.grantRole(roles.MINTER, owner.address); - const amount = parseUnits('1000'); // 1k USDM + const amount = parseUnits('1000'); // 1k USDX await contract.mint(acc1.address, amount); // Mint 1k await contract.addRewardMultiplier(rewardMultiplierIncrement); @@ -643,19 +643,19 @@ describe('USDM', () => { }); it('mints accurately over an extended period', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.ORACLE, owner.address); await contract.grantRole(roles.MINTER, owner.address); // Absurd worst case scenario is used to test the decimal accuracy of the contract - // Mint 1 USDM and set 4bps as reward multiplier everyday for 5 years + // Mint 1 USDX and set 4bps as reward multiplier everyday for 5 years const rewardMultiplierIncrement = parseUnits('0.001'); // 10bps - const amount = parseUnits('1'); // 1 USDM + const amount = parseUnits('1'); // 1 USDX const DAYS_IN_FIVE_YEARS = 365 * 5; // 5 years for (let i = 0; i < DAYS_IN_FIVE_YEARS; i++) { - await contract.mint(acc1.address, amount); // Mint 1 USDM + await contract.mint(acc1.address, amount); // Mint 1 USDX await contract.addRewardMultiplier(rewardMultiplierIncrement); } @@ -677,7 +677,7 @@ describe('USDM', () => { describe('Balance', () => { it('returns the amount of tokens, not shares', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const tokensAmount = parseUnits('10'); const rewardMultiplier = parseUnits('1.0001'); @@ -692,14 +692,14 @@ describe('USDM', () => { describe('Shares', () => { it('has zero balance and shares for new accounts', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); expect(await contract.balanceOf(acc1.address)).to.equal(0); expect(await contract.sharesOf(acc1.address)).to.equal(0); }); it('does not change amount of shares when updating the reward multiplier', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const sharesAmount = parseUnits('1'); @@ -713,7 +713,7 @@ describe('USDM', () => { }); it('returns the amount of shares based on tokens', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const amount = parseUnits('14'); const rewardMultiplier = parseUnits('1.0001'); @@ -727,7 +727,7 @@ describe('USDM', () => { }); it('returns the amount of tokens based on shares', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const shares = parseUnits('14'); const rewardMultiplier = parseUnits('1.0001'); @@ -743,7 +743,7 @@ describe('USDM', () => { describe('Mint', () => { it('increments total shares', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, owner.address); @@ -756,7 +756,7 @@ describe('USDM', () => { }); it('increments total supply', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, owner.address); @@ -769,7 +769,7 @@ describe('USDM', () => { }); it('emits a transfer event', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, owner.address); @@ -781,7 +781,7 @@ describe('USDM', () => { }); it('emits a transfer event with amount of tokens not shares', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, owner.address); await contract.grantRole(roles.ORACLE, owner.address); @@ -796,7 +796,7 @@ describe('USDM', () => { }); it('mints shares to correct address', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, owner.address); @@ -808,21 +808,21 @@ describe('USDM', () => { }); it('does not allow minting to null address', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.MINTER, owner.address); const amount = parseUnits('1'); await expect(contract.mint(AddressZero, amount)) - .to.be.revertedWithCustomError(contract, 'USDMInvalidMintReceiver') + .to.be.revertedWithCustomError(contract, 'USDXInvalidMintReceiver') .withArgs(AddressZero); }); }); describe('Burn', () => { it('decrements account shares', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BURNER, owner.address); @@ -835,7 +835,7 @@ describe('USDM', () => { }); it('decrements total shares quantity', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BURNER, owner.address); @@ -848,28 +848,28 @@ describe('USDM', () => { }); it('does not allow burning from null address', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BURNER, owner.address); await expect(contract.burn(AddressZero, 1)) - .to.be.revertedWithCustomError(contract, 'USDMInvalidBurnSender') + .to.be.revertedWithCustomError(contract, 'USDXInvalidBurnSender') .withArgs(AddressZero); }); it('does not allow burning when amount exceeds balance', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BURNER, owner.address); const balance = await contract.balanceOf(owner.address); await expect(contract.burn(owner.address, balance.add(1))) - .to.be.revertedWithCustomError(contract, 'USDMInsufficientBurnBalance') + .to.be.revertedWithCustomError(contract, 'USDXInsufficientBurnBalance') .withArgs(owner.address, balance, balance.add(1)); }); it('emits a transfer events', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const amount = 1; await contract.grantRole(roles.BURNER, owner.address); @@ -881,7 +881,7 @@ describe('USDM', () => { }); it('emits a transfer event with amount of tokens not shares', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); await contract.grantRole(roles.BURNER, owner.address); await contract.grantRole(roles.ORACLE, owner.address); @@ -898,7 +898,7 @@ describe('USDM', () => { describe('Approve', () => { it('reverts when owner is the zero address', async () => { - const { contract, owner } = await loadFixture(deployUSDMFixture); + const { contract, owner } = await loadFixture(deployUSDXFixture); const signerZero = await ethers.getImpersonatedSigner(AddressZero); // Fund the zero address to pay for the transaction @@ -913,7 +913,7 @@ describe('USDM', () => { }); it('reverts when spender is the zero address', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); await expect(contract.approve(AddressZero, 1)) .to.revertedWithCustomError(contract, 'ERC20InvalidSpender') @@ -921,7 +921,7 @@ describe('USDM', () => { }); it('emits an approval event', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = 1; await expect(contract.approve(acc1.address, amount)) @@ -930,7 +930,7 @@ describe('USDM', () => { }); it('approves the request amount', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = 1; await contract.approve(acc1.address, amount); @@ -939,7 +939,7 @@ describe('USDM', () => { }); it('approves the request amount and replace the previous one', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = 1; await contract.approve(acc1.address, amount + 1); @@ -951,7 +951,7 @@ describe('USDM', () => { describe('Increase Allowance', () => { it('approves the requested amount', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = 1; await contract.increaseAllowance(acc1.address, amount); @@ -960,7 +960,7 @@ describe('USDM', () => { }); it('increases the spender allowance adding the requested amount', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = 1; await contract.approve(acc1.address, amount); @@ -970,7 +970,7 @@ describe('USDM', () => { }); it('emits an approval event', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const amount = 1; await expect(await contract.increaseAllowance(acc1.address, amount)) @@ -979,7 +979,7 @@ describe('USDM', () => { }); it('reverts when spender is the zero address', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); const amount = 1; await expect(contract.increaseAllowance(AddressZero, amount)) @@ -990,7 +990,7 @@ describe('USDM', () => { describe('Decrease Allowance', () => { it('reverts when there was no approved amount before decreasing', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); await expect(contract.decreaseAllowance(acc1.address, 1)) .to.be.revertedWithCustomError(contract, 'ERC20InsufficientAllowance') @@ -998,7 +998,7 @@ describe('USDM', () => { }); it('decreases the spender allowance substracting the requested amount', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const spender = acc1.address; const amount = 2; const subtractedAmount = 1; @@ -1010,7 +1010,7 @@ describe('USDM', () => { }); it('sets allowance to zero when all allowance is removed', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const spender = acc1.address; const amount = 1; const subtractedAmount = 1; @@ -1022,7 +1022,7 @@ describe('USDM', () => { }); it('reverts when more than the allowance is substracted', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); const spender = acc1.address; const amount = 1; @@ -1034,7 +1034,7 @@ describe('USDM', () => { }); it('emits an approval event', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const spender = acc1.address; const amount = 2; const subtractedAmount = 1; @@ -1049,7 +1049,7 @@ describe('USDM', () => { describe('Transfer From', () => { it('does not update allowance amount in case of infinite allowance', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; @@ -1061,7 +1061,7 @@ describe('USDM', () => { }); it('transfers the requested amount when has enough allowance', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; const amount = 1; @@ -1076,7 +1076,7 @@ describe('USDM', () => { }); it('decreses the spender allowance', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; @@ -1087,7 +1087,7 @@ describe('USDM', () => { }); it('reverts when insufficient allowance', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; const amount = 1; @@ -1100,7 +1100,7 @@ describe('USDM', () => { }); it('emits a transfer event', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; const amount = 1; @@ -1113,7 +1113,7 @@ describe('USDM', () => { }); it('emits an approval event', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; const amount = 1; @@ -1126,7 +1126,7 @@ describe('USDM', () => { }); it('reverts when enough allowance but not have enough balance', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; const amount = await contract.balanceOf(from); @@ -1139,7 +1139,7 @@ describe('USDM', () => { }); it('decreases allowance by amount of tokens, not by shares', async () => { - const { contract, owner, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1 } = await loadFixture(deployUSDXFixture); const from = owner.address; const to = acc1.address; const amount = parseUnits('1'); @@ -1210,12 +1210,12 @@ describe('USDM', () => { }; it('initializes nonce at 0', async () => { - const { contract, acc1 } = await loadFixture(deployUSDMFixture); + const { contract, acc1 } = await loadFixture(deployUSDXFixture); expect(await contract.nonces(acc1.address)).to.equal(0); }); it('returns the correct domain separator', async () => { - const { contract } = await loadFixture(deployUSDMFixture); + const { contract } = await loadFixture(deployUSDXFixture); const chainId = (await contract.provider.getNetwork()).chainId; const expected = keccak256( @@ -1234,7 +1234,7 @@ describe('USDM', () => { }); it('accepts owner signature', async () => { - const { contract, owner, acc1: spender } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1: spender } = await loadFixture(deployUSDXFixture); const value = 100; const nonce = await contract.nonces(owner.address); const deadline = MaxUint256; @@ -1250,7 +1250,7 @@ describe('USDM', () => { }); it('reverts reused signature', async () => { - const { contract, owner, acc1: spender } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1: spender } = await loadFixture(deployUSDXFixture); const value = 100; const nonce = await contract.nonces(owner.address); const deadline = MaxUint256; @@ -1266,7 +1266,7 @@ describe('USDM', () => { }); it('reverts other signature', async () => { - const { contract, owner, acc1: spender, acc2: otherAcc } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1: spender, acc2: otherAcc } = await loadFixture(deployUSDXFixture); const value = 100; const nonce = await contract.nonces(owner.address); const deadline = MaxUint256; @@ -1280,7 +1280,7 @@ describe('USDM', () => { }); it('reverts expired permit', async () => { - const { contract, owner, acc1: spender } = await loadFixture(deployUSDMFixture); + const { contract, owner, acc1: spender } = await loadFixture(deployUSDXFixture); const value = 100; const nonce = await contract.nonces(owner.address); const deadline = await time.latest(); diff --git a/test/wUSDM.ts b/test/wUSDX.ts similarity index 53% rename from test/wUSDM.ts rename to test/wUSDX.ts index 49c80c6..1f747d5 100644 --- a/test/wUSDM.ts +++ b/test/wUSDX.ts @@ -18,10 +18,10 @@ const roles = { DEFAULT_ADMIN_ROLE: ethers.constants.HashZero, }; -describe('wUSDM', () => { - const name = 'Wrapped Mountain Protocol USD'; - const symbol = 'wUSDM'; - const totalUSDMShares = parseUnits('1337'); +describe('wUSDX', () => { + const name = 'Wrapped X Protocol USD'; + const symbol = 'wUSDX'; + const totalUSDXShares = parseUnits('1337'); // We define a fixture to reuse the same setup in every test. // We use loadFixture to run this setup once, snapshot that state, @@ -30,81 +30,81 @@ describe('wUSDM', () => { // Contracts are deployed using the first signer/account by default const [owner, acc1, acc2] = await ethers.getSigners(); - const USDM = await ethers.getContractFactory('USDM'); - const USDMContract = await upgrades.deployProxy(USDM, ['USDM-n', 'USDM-s', owner.address], { + const USDX = await ethers.getContractFactory('USDX'); + const USDXContract = await upgrades.deployProxy(USDX, ['USDX-n', 'USDX-s', owner.address], { initializer: 'initialize', }); - await USDMContract.grantRole(roles.MINTER, owner.address); - await USDMContract.grantRole(roles.ORACLE, owner.address); - await USDMContract.grantRole(roles.PAUSE, owner.address); - await USDMContract.grantRole(roles.BLOCKLIST, owner.address); - await USDMContract.mint(owner.address, totalUSDMShares); + await USDXContract.grantRole(roles.MINTER, owner.address); + await USDXContract.grantRole(roles.ORACLE, owner.address); + await USDXContract.grantRole(roles.PAUSE, owner.address); + await USDXContract.grantRole(roles.BLOCKLIST, owner.address); + await USDXContract.mint(owner.address, totalUSDXShares); - const wUSDM = await ethers.getContractFactory('wUSDM'); - const wUSDMContract = await upgrades.deployProxy(wUSDM, [USDMContract.address, owner.address], { + const wUSDX = await ethers.getContractFactory('wUSDX'); + const wUSDXContract = await upgrades.deployProxy(wUSDX, [USDXContract.address, owner.address], { initializer: 'initialize', }); - await wUSDMContract.grantRole(roles.PAUSE, owner.address); - await wUSDMContract.grantRole(roles.UPGRADE, owner.address); + await wUSDXContract.grantRole(roles.PAUSE, owner.address); + await wUSDXContract.grantRole(roles.UPGRADE, owner.address); - return { wUSDMContract, USDMContract, owner, acc1, acc2 }; + return { wUSDXContract, USDXContract, owner, acc1, acc2 }; }; describe('Deployment', () => { it('has a name', async () => { - const { wUSDMContract } = await loadFixture(deployFixture); + const { wUSDXContract } = await loadFixture(deployFixture); - expect(await wUSDMContract.name()).to.equal(name); + expect(await wUSDXContract.name()).to.equal(name); }); it('has a symbol', async () => { - const { wUSDMContract } = await loadFixture(deployFixture); + const { wUSDXContract } = await loadFixture(deployFixture); - expect(await wUSDMContract.symbol()).to.equal(symbol); + expect(await wUSDXContract.symbol()).to.equal(symbol); }); it('has an asset', async () => { - const { wUSDMContract, USDMContract } = await loadFixture(deployFixture); + const { wUSDXContract, USDXContract } = await loadFixture(deployFixture); - expect(await wUSDMContract.asset()).to.equal(USDMContract.address); + expect(await wUSDXContract.asset()).to.equal(USDXContract.address); }); it('has a totalAssets', async () => { - const { wUSDMContract } = await loadFixture(deployFixture); + const { wUSDXContract } = await loadFixture(deployFixture); - expect(await wUSDMContract.totalAssets()).to.equal(0); + expect(await wUSDXContract.totalAssets()).to.equal(0); }); it('has a maxDeposit', async () => { - const { wUSDMContract, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, acc1 } = await loadFixture(deployFixture); - expect(await wUSDMContract.maxDeposit(acc1.address)).to.equal(MaxUint256); + expect(await wUSDXContract.maxDeposit(acc1.address)).to.equal(MaxUint256); }); it('has a maxMint', async () => { - const { wUSDMContract, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, acc1 } = await loadFixture(deployFixture); - expect(await wUSDMContract.maxMint(acc1.address)).to.equal(MaxUint256); + expect(await wUSDXContract.maxMint(acc1.address)).to.equal(MaxUint256); }); it('has 18 decimals', async () => { - const { wUSDMContract } = await loadFixture(deployFixture); + const { wUSDXContract } = await loadFixture(deployFixture); - expect(await wUSDMContract.decimals()).to.be.equal(18); + expect(await wUSDXContract.decimals()).to.be.equal(18); }); it('grants admin role to the address passed to the initializer', async () => { - const { wUSDMContract, owner } = await loadFixture(deployFixture); + const { wUSDXContract, owner } = await loadFixture(deployFixture); - expect(await wUSDMContract.hasRole(await wUSDMContract.DEFAULT_ADMIN_ROLE(), owner.address)).to.equal(true); + expect(await wUSDXContract.hasRole(await wUSDXContract.DEFAULT_ADMIN_ROLE(), owner.address)).to.equal(true); }); it('fails if initialize is called again after initialization', async () => { - const { wUSDMContract, USDMContract, owner } = await loadFixture(deployFixture); + const { wUSDXContract, USDXContract, owner } = await loadFixture(deployFixture); - await expect(wUSDMContract.initialize(USDMContract.address, owner.address)).to.be.revertedWith( + await expect(wUSDXContract.initialize(USDXContract.address, owner.address)).to.be.revertedWith( 'Initializable: contract is already initialized', ); }); @@ -112,67 +112,67 @@ describe('wUSDM', () => { describe('Access control', () => { it('pauses when pause role', async () => { - const { wUSDMContract, owner } = await loadFixture(deployFixture); + const { wUSDXContract, owner } = await loadFixture(deployFixture); - await expect(await wUSDMContract.pause()).to.not.be.revertedWith( + await expect(await wUSDXContract.pause()).to.not.be.revertedWith( `AccessControl: account ${owner.address.toLowerCase()} is missing role ${roles.PAUSE}`, ); }); it('does not pause without pause role', async () => { - const { wUSDMContract, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, acc1 } = await loadFixture(deployFixture); - await expect(wUSDMContract.connect(acc1).pause()).to.be.revertedWith( + await expect(wUSDXContract.connect(acc1).pause()).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.PAUSE}`, ); }); it('unpauses when pause role', async () => { - const { wUSDMContract, owner } = await loadFixture(deployFixture); + const { wUSDXContract, owner } = await loadFixture(deployFixture); - await wUSDMContract.connect(owner).pause(); + await wUSDXContract.connect(owner).pause(); - await expect(await wUSDMContract.unpause()).to.not.be.revertedWith( + await expect(await wUSDXContract.unpause()).to.not.be.revertedWith( `AccessControl: account ${owner.address.toLowerCase()} is missing role ${roles.PAUSE}`, ); }); it('does not unpause without pause role', async () => { - const { wUSDMContract, owner, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, owner, acc1 } = await loadFixture(deployFixture); - await wUSDMContract.connect(owner).pause(); + await wUSDXContract.connect(owner).pause(); - await expect(wUSDMContract.connect(acc1).unpause()).to.be.revertedWith( + await expect(wUSDXContract.connect(acc1).unpause()).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.PAUSE}`, ); }); it('does not upgrade without upgrade role', async () => { - const { wUSDMContract, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, acc1 } = await loadFixture(deployFixture); - await expect(wUSDMContract.connect(acc1).upgradeTo(AddressZero)).to.be.revertedWith( + await expect(wUSDXContract.connect(acc1).upgradeTo(AddressZero)).to.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.UPGRADE}`, ); }); it('upgrades with upgrade role', async () => { - const { wUSDMContract, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, acc1 } = await loadFixture(deployFixture); - await wUSDMContract.grantRole(roles.UPGRADE, acc1.address); + await wUSDXContract.grantRole(roles.UPGRADE, acc1.address); - await expect(wUSDMContract.connect(acc1).upgradeTo(AddressZero)).to.not.be.revertedWith( + await expect(wUSDXContract.connect(acc1).upgradeTo(AddressZero)).to.not.be.revertedWith( `AccessControl: account ${acc1.address.toLowerCase()} is missing role ${roles.UPGRADE}`, ); }); }); - describe('Pause status should follow USDM pause status', () => { - it('should be paused when USDM is paused', async () => { - const { wUSDMContract, USDMContract, owner } = await loadFixture(deployFixture); + describe('Pause status should follow USDX pause status', () => { + it('should be paused when USDX is paused', async () => { + const { wUSDXContract, USDXContract, owner } = await loadFixture(deployFixture); - expect(await wUSDMContract.paused()).to.equal(false); - await USDMContract.connect(owner).pause(); - expect(await wUSDMContract.paused()).to.equal(true); + expect(await wUSDXContract.paused()).to.equal(false); + await USDXContract.connect(owner).pause(); + expect(await wUSDXContract.paused()).to.equal(true); }); }); @@ -185,97 +185,97 @@ describe('wUSDM', () => { }; it('can accrue value without rebasing', async () => { - const { wUSDMContract, USDMContract, owner } = await loadFixture(deployFixture); - const initialBalance = await USDMContract.balanceOf(owner.address); + const { wUSDXContract, USDXContract, owner } = await loadFixture(deployFixture); + const initialBalance = await USDXContract.balanceOf(owner.address); - await USDMContract.connect(owner).approve(wUSDMContract.address, MaxUint256); - await wUSDMContract.connect(owner).deposit(initialBalance, owner.address); + await USDXContract.connect(owner).approve(wUSDXContract.address, MaxUint256); + await wUSDXContract.connect(owner).deposit(initialBalance, owner.address); - expect(await USDMContract.balanceOf(owner.address)).to.be.equal(0); - expect(await wUSDMContract.balanceOf(owner.address)).to.be.equal(initialBalance); + expect(await USDXContract.balanceOf(owner.address)).to.be.equal(0); + expect(await wUSDXContract.balanceOf(owner.address)).to.be.equal(initialBalance); const rewardMultiplier = parseUnits('1.0001'); const expectedIncrement = initialBalance.mul(rewardMultiplier).div(parseUnits('1')); - await USDMContract.connect(owner).setRewardMultiplier(rewardMultiplier); + await USDXContract.connect(owner).setRewardMultiplier(rewardMultiplier); - expect(await wUSDMContract.balanceOf(owner.address)).to.be.equal(initialBalance); - expect(await wUSDMContract.totalAssets()).to.be.equal(expectedIncrement); - expect(await USDMContract.balanceOf(wUSDMContract.address)).to.be.equal(expectedIncrement); + expect(await wUSDXContract.balanceOf(owner.address)).to.be.equal(initialBalance); + expect(await wUSDXContract.totalAssets()).to.be.equal(expectedIncrement); + expect(await USDXContract.balanceOf(wUSDXContract.address)).to.be.equal(expectedIncrement); - await wUSDMContract + await wUSDXContract .connect(owner) - .redeem(await wUSDMContract.balanceOf(owner.address), owner.address, owner.address); + .redeem(await wUSDXContract.balanceOf(owner.address), owner.address, owner.address); - expectEqualWithError(await USDMContract.balanceOf(owner.address), expectedIncrement); + expectEqualWithError(await USDXContract.balanceOf(owner.address), expectedIncrement); }); }); describe('Transfer between users', () => { - it('can transfer wUSDM and someone else redeem', async () => { - const { wUSDMContract, USDMContract, owner, acc1 } = await loadFixture(deployFixture); + it('can transfer wUSDX and someone else redeem', async () => { + const { wUSDXContract, USDXContract, owner, acc1 } = await loadFixture(deployFixture); - await USDMContract.connect(owner).approve(wUSDMContract.address, MaxUint256); - await wUSDMContract.connect(owner).deposit(parseUnits('2'), owner.address); - await wUSDMContract.connect(owner).transfer(acc1.address, parseUnits('1')); + await USDXContract.connect(owner).approve(wUSDXContract.address, MaxUint256); + await wUSDXContract.connect(owner).deposit(parseUnits('2'), owner.address); + await wUSDXContract.connect(owner).transfer(acc1.address, parseUnits('1')); - expect(await wUSDMContract.totalAssets()).to.be.equal(parseUnits('2')); - expect(await wUSDMContract.balanceOf(acc1.address)).to.be.equal(parseUnits('1')); - expect(await wUSDMContract.maxWithdraw(acc1.address)).to.be.equal(parseUnits('1')); + expect(await wUSDXContract.totalAssets()).to.be.equal(parseUnits('2')); + expect(await wUSDXContract.balanceOf(acc1.address)).to.be.equal(parseUnits('1')); + expect(await wUSDXContract.maxWithdraw(acc1.address)).to.be.equal(parseUnits('1')); - await wUSDMContract.connect(acc1).withdraw(parseUnits('1'), acc1.address, acc1.address); + await wUSDXContract.connect(acc1).withdraw(parseUnits('1'), acc1.address, acc1.address); - expect(await USDMContract.balanceOf(acc1.address)).to.be.equal(parseUnits('1')); + expect(await USDXContract.balanceOf(acc1.address)).to.be.equal(parseUnits('1')); }); - it('should not transfer on a USDM pause', async () => { - const { wUSDMContract, USDMContract, owner, acc1 } = await loadFixture(deployFixture); + it('should not transfer on a USDX pause', async () => { + const { wUSDXContract, USDXContract, owner, acc1 } = await loadFixture(deployFixture); - await USDMContract.connect(owner).approve(wUSDMContract.address, MaxUint256); - await wUSDMContract.connect(owner).deposit(parseUnits('2'), owner.address); - await USDMContract.connect(owner).pause(); + await USDXContract.connect(owner).approve(wUSDXContract.address, MaxUint256); + await wUSDXContract.connect(owner).deposit(parseUnits('2'), owner.address); + await USDXContract.connect(owner).pause(); - await expect(wUSDMContract.connect(owner).transfer(acc1.address, parseUnits('2'))).to.be.revertedWithCustomError( - wUSDMContract, - 'wUSDMPausedTransfers', + await expect(wUSDXContract.connect(owner).transfer(acc1.address, parseUnits('2'))).to.be.revertedWithCustomError( + wUSDXContract, + 'wUSDXPausedTransfers', ); - await USDMContract.connect(owner).unpause(); + await USDXContract.connect(owner).unpause(); - await expect(wUSDMContract.connect(owner).transfer(acc1.address, parseUnits('2'))).not.to.be.reverted; + await expect(wUSDXContract.connect(owner).transfer(acc1.address, parseUnits('2'))).not.to.be.reverted; }); it('should not transfer if blocked', async () => { - const { wUSDMContract, USDMContract, owner, acc1, acc2 } = await loadFixture(deployFixture); + const { wUSDXContract, USDXContract, owner, acc1, acc2 } = await loadFixture(deployFixture); - await USDMContract.connect(owner).approve(wUSDMContract.address, MaxUint256); - await wUSDMContract.connect(owner).deposit(parseUnits('2'), owner.address); - await wUSDMContract.connect(owner).transfer(acc1.address, parseUnits('2')); - await USDMContract.connect(owner).blockAccounts([acc1.address]); + await USDXContract.connect(owner).approve(wUSDXContract.address, MaxUint256); + await wUSDXContract.connect(owner).deposit(parseUnits('2'), owner.address); + await wUSDXContract.connect(owner).transfer(acc1.address, parseUnits('2')); + await USDXContract.connect(owner).blockAccounts([acc1.address]); - await expect(wUSDMContract.connect(acc1).transfer(acc2.address, parseUnits('2'))).to.be.revertedWithCustomError( - wUSDMContract, - 'wUSDMBlockedSender', + await expect(wUSDXContract.connect(acc1).transfer(acc2.address, parseUnits('2'))).to.be.revertedWithCustomError( + wUSDXContract, + 'wUSDXBlockedSender', ); - await USDMContract.connect(owner).unblockAccounts([acc1.address]); + await USDXContract.connect(owner).unblockAccounts([acc1.address]); - await expect(wUSDMContract.connect(acc1).transfer(acc1.address, parseUnits('2'))).not.to.be.reverted; + await expect(wUSDXContract.connect(acc1).transfer(acc1.address, parseUnits('2'))).not.to.be.reverted; }); it('transfers the proper amount with a non default multiplier', async () => { - const { wUSDMContract, USDMContract, owner, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, USDXContract, owner, acc1 } = await loadFixture(deployFixture); const amount = '1999999692838904485'; // 1.999999692838904485 - await USDMContract.connect(owner).setRewardMultiplier('1002948000000000000'); // 1.002948 - expect(await wUSDMContract.balanceOf(acc1.address)).to.equal(0); + await USDXContract.connect(owner).setRewardMultiplier('1002948000000000000'); // 1.002948 + expect(await wUSDXContract.balanceOf(acc1.address)).to.equal(0); - await USDMContract.connect(owner).approve(wUSDMContract.address, MaxUint256); - await wUSDMContract.connect(owner).deposit(parseUnits('100'), owner.address); + await USDXContract.connect(owner).approve(wUSDXContract.address, MaxUint256); + await wUSDXContract.connect(owner).deposit(parseUnits('100'), owner.address); - await wUSDMContract.connect(owner).transfer(acc1.address, amount); + await wUSDXContract.connect(owner).transfer(acc1.address, amount); - expect(await wUSDMContract.balanceOf(acc1.address)).to.equal('1999999692838904485'); + expect(await wUSDXContract.balanceOf(acc1.address)).to.equal('1999999692838904485'); }); }); @@ -336,81 +336,81 @@ describe('wUSDM', () => { }; it('initializes nonce at 0', async () => { - const { wUSDMContract, acc1 } = await loadFixture(deployFixture); + const { wUSDXContract, acc1 } = await loadFixture(deployFixture); - expect(await wUSDMContract.nonces(acc1.address)).to.equal(0); + expect(await wUSDXContract.nonces(acc1.address)).to.equal(0); }); it('returns the correct domain separator', async () => { - const { wUSDMContract } = await loadFixture(deployFixture); - const chainId = (await wUSDMContract.provider.getNetwork()).chainId; + const { wUSDXContract } = await loadFixture(deployFixture); + const chainId = (await wUSDXContract.provider.getNetwork()).chainId; const expected = keccak256( defaultAbiCoder.encode( ['bytes32', 'bytes32', 'bytes32', 'uint256', 'address'], [ id('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'), - id(await wUSDMContract.name()), + id(await wUSDXContract.name()), id('1'), chainId, - wUSDMContract.address, + wUSDXContract.address, ], ), ); - expect(await wUSDMContract.DOMAIN_SEPARATOR()).to.equal(expected); + expect(await wUSDXContract.DOMAIN_SEPARATOR()).to.equal(expected); }); it('accepts owner signature', async () => { - const { wUSDMContract, owner, acc1: spender } = await loadFixture(deployFixture); + const { wUSDXContract, owner, acc1: spender } = await loadFixture(deployFixture); const value = 100; - const nonce = await wUSDMContract.nonces(owner.address); + const nonce = await wUSDXContract.nonces(owner.address); const deadline = MaxUint256; - const { domain, types, message } = await buildData(wUSDMContract, owner, spender, value, nonce, deadline); + const { domain, types, message } = await buildData(wUSDXContract, owner, spender, value, nonce, deadline); const { v, r, s } = await signTypedData(owner, domain, types, message); - await expect(wUSDMContract.permit(owner.address, spender.address, value, deadline, v, r, s)) - .to.emit(wUSDMContract, 'Approval') + await expect(wUSDXContract.permit(owner.address, spender.address, value, deadline, v, r, s)) + .to.emit(wUSDXContract, 'Approval') .withArgs(owner.address, spender.address, value); - expect(await wUSDMContract.nonces(owner.address)).to.equal(1); - expect(await wUSDMContract.allowance(owner.address, spender.address)).to.equal(value); + expect(await wUSDXContract.nonces(owner.address)).to.equal(1); + expect(await wUSDXContract.allowance(owner.address, spender.address)).to.equal(value); }); it('reverts reused signature', async () => { - const { wUSDMContract, owner, acc1: spender } = await loadFixture(deployFixture); + const { wUSDXContract, owner, acc1: spender } = await loadFixture(deployFixture); const value = 100; - const nonce = await wUSDMContract.nonces(owner.address); + const nonce = await wUSDXContract.nonces(owner.address); const deadline = MaxUint256; - const { domain, types, message } = await buildData(wUSDMContract, owner, spender, value, nonce, deadline); + const { domain, types, message } = await buildData(wUSDXContract, owner, spender, value, nonce, deadline); const { v, r, s } = await signTypedData(owner, domain, types, message); - await wUSDMContract.permit(owner.address, spender.address, value, deadline, v, r, s); + await wUSDXContract.permit(owner.address, spender.address, value, deadline, v, r, s); - await expect(wUSDMContract.permit(owner.address, spender.address, value, deadline, v, r, s)) - .to.be.revertedWithCustomError(wUSDMContract, 'ERC2612InvalidSignature') + await expect(wUSDXContract.permit(owner.address, spender.address, value, deadline, v, r, s)) + .to.be.revertedWithCustomError(wUSDXContract, 'ERC2612InvalidSignature') .withArgs(owner.address, spender.address); }); it('reverts other signature', async () => { - const { wUSDMContract, owner, acc1: spender, acc2: otherAcc } = await loadFixture(deployFixture); + const { wUSDXContract, owner, acc1: spender, acc2: otherAcc } = await loadFixture(deployFixture); const value = 100; - const nonce = await wUSDMContract.nonces(owner.address); + const nonce = await wUSDXContract.nonces(owner.address); const deadline = MaxUint256; - const { domain, types, message } = await buildData(wUSDMContract, owner, spender, value, nonce, deadline); + const { domain, types, message } = await buildData(wUSDXContract, owner, spender, value, nonce, deadline); const { v, r, s } = await signTypedData(otherAcc, domain, types, message); - await expect(wUSDMContract.permit(owner.address, spender.address, value, deadline, v, r, s)) - .to.be.revertedWithCustomError(wUSDMContract, 'ERC2612InvalidSignature') + await expect(wUSDXContract.permit(owner.address, spender.address, value, deadline, v, r, s)) + .to.be.revertedWithCustomError(wUSDXContract, 'ERC2612InvalidSignature') .withArgs(owner.address, spender.address); }); it('reverts expired permit', async () => { - const { wUSDMContract, owner, acc1: spender } = await loadFixture(deployFixture); + const { wUSDXContract, owner, acc1: spender } = await loadFixture(deployFixture); const value = 100; - const nonce = await wUSDMContract.nonces(owner.address); + const nonce = await wUSDXContract.nonces(owner.address); const deadline = await time.latest(); // Advance time by one hour and mine a new block @@ -421,11 +421,11 @@ describe('wUSDM', () => { const blockTimestamp = (await time.latest()) + 1; await time.setNextBlockTimestamp(blockTimestamp); - const { domain, types, message } = await buildData(wUSDMContract, owner, spender, value, nonce, deadline); + const { domain, types, message } = await buildData(wUSDXContract, owner, spender, value, nonce, deadline); const { v, r, s } = await signTypedData(owner, domain, types, message); - await expect(wUSDMContract.permit(owner.address, spender.address, value, deadline, v, r, s)) - .to.be.revertedWithCustomError(wUSDMContract, 'ERC2612ExpiredDeadline') + await expect(wUSDXContract.permit(owner.address, spender.address, value, deadline, v, r, s)) + .to.be.revertedWithCustomError(wUSDXContract, 'ERC2612ExpiredDeadline') .withArgs(deadline, blockTimestamp); }); });